Skip to content

A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search

fix(web): fix shrunk header on safari

Mohamed Bassemb0a41d2d073a
diff --git a/apps/web/components/dashboard/GlobalActions.tsx b/apps/web/components/dashboard/GlobalActions.tsx
index d385111a..2b0d4730 100644
--- a/apps/web/components/dashboard/GlobalActions.tsx
+++ b/apps/web/components/dashboard/GlobalActions.tsx
@@ -10,7 +10,7 @@ export default function GlobalActions() {
(state) => state.inBookmarkGrid,
);
return (
- <div className="flex min-w-max flex-wrap overflow-hidden">
+ <div className="flex min-w-max shrink-0 overflow-hidden">
{inBookmarkGrid && <ViewOptions />}
{inBookmarkGrid && <BulkBookmarksAction />}
{inBookmarkGrid && <SortOrderToggle />}
diff --git a/apps/web/components/dashboard/header/Header.tsx b/apps/web/components/dashboard/header/Header.tsx
index 3dd37346..f09dcb2e 100644
--- a/apps/web/components/dashboard/header/Header.tsx
+++ b/apps/web/components/dashboard/header/Header.tsx
@@ -13,17 +13,17 @@ export default async function Header() {
}
return (
- <header className="sticky left-0 right-0 top-0 z-50 flex h-16 items-center justify-between overflow-x-auto overflow-y-hidden bg-background p-4 shadow">
- <div className="hidden items-center sm:flex">
+ <header className="sticky left-0 right-0 top-0 z-50 flex h-16 w-full min-w-0 items-center gap-2 overflow-hidden bg-background p-4 shadow">
+ <div className="hidden shrink-0 items-center sm:flex">
<Link href={"/dashboard/bookmarks"} className="w-56 xl:w-[17rem]">
<KarakeepLogo height={38} />
</Link>
</div>
- <div className="flex flex-1 gap-2">
+ <div className="flex min-w-0 flex-1 gap-2">
<SearchInput className="rounded-md bg-muted" />
<GlobalActions />
</div>
- <div className="flex items-center">
+ <div className="flex shrink-0 items-center">
<ProfileOptions />
</div>
</header>
diff --git a/apps/web/components/dashboard/search/SearchInput.tsx b/apps/web/components/dashboard/search/SearchInput.tsx
index a09e635f..bda7a10d 100644
--- a/apps/web/components/dashboard/search/SearchInput.tsx
+++ b/apps/web/components/dashboard/search/SearchInput.tsx
@@ -188,7 +188,7 @@ const SearchInput = React.forwardRef<
parsedValue.result === "full" && parsedValue.text.length === 0;
return (
- <div className={cn("relative flex-1", className)}>
+ <div className={cn("relative min-w-0 flex-1", className)}>
<EditListModal
open={newNestedListModalOpen}
setOpen={setNewNestedListModalOpen}
@@ -227,7 +227,7 @@ const SearchInput = React.forwardRef<
</div>
<Command
shouldFilter={false}
- className="relative rounded-md bg-transparent"
+ className="relative min-w-0 rounded-md bg-transparent [&_[cmdk-input-wrapper]]:min-w-0 [&_[cmdk-input]]:min-w-0"
onKeyDown={handleCommandKeyDown}
>
<Popover open={isPopoverVisible}>