From 4a1e506a3527d63fbcb1ea3b0bb046906e69ea37 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Sat, 2 Mar 2024 19:05:16 -0800 Subject: [PATCH] fix: input autofocus on mobile issue --- src/lib/components/layout/Sidebar.svelte | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lib/components/layout/Sidebar.svelte b/src/lib/components/layout/Sidebar.svelte index 1061a1ab7..7e02926da 100644 --- a/src/lib/components/layout/Sidebar.svelte +++ b/src/lib/components/layout/Sidebar.svelte @@ -35,7 +35,7 @@ let isEditing = false; onMount(async () => { - if (window.innerWidth > 1280) { + if (window.innerWidth > 1024) { show = true; } await chats.set(await getChatList(localStorage.token)); @@ -383,6 +383,11 @@ ? 'bg-gray-900' : ''} transition whitespace-nowrap text-ellipsis" href="/c/{chat.id}" + on:click={() => { + if (window.innerWidth < 1024) { + show = false; + } + }} >