diff --git a/src/lib/components/chat/Messages.svelte b/src/lib/components/chat/Messages.svelte index 3bca2efd..b02ba116 100644 --- a/src/lib/components/chat/Messages.svelte +++ b/src/lib/components/chat/Messages.svelte @@ -29,7 +29,6 @@ $: if (autoScroll && bottomPadding) { (async () => { await tick(); - scrollToBottom(); })(); } @@ -167,7 +166,7 @@ await tick(); const element = document.getElementById('messages-container'); - autoScroll = element.scrollHeight - element.scrollTop === element.clientHeight - 40; + autoScroll = element.scrollHeight - element.scrollTop <= element.clientHeight + 50; setTimeout(() => { scrollToBottom(); @@ -216,7 +215,7 @@ await tick(); const element = document.getElementById('messages-container'); - autoScroll = element.scrollHeight - element.scrollTop === element.clientHeight - 40; + autoScroll = element.scrollHeight - element.scrollTop <= element.clientHeight + 50; setTimeout(() => { scrollToBottom(); diff --git a/src/lib/components/layout/Sidebar.svelte b/src/lib/components/layout/Sidebar.svelte index 266eab3b..6136b19e 100644 --- a/src/lib/components/layout/Sidebar.svelte +++ b/src/lib/components/layout/Sidebar.svelte @@ -89,10 +89,14 @@ bind:this={navElement} class="h-screen {show ? '' - : '-translate-x-[260px] w-[0px]'} w-[260px] bg-black text-gray-200 shadow-2xl text-sm transition z-40 fixed top-0 left-0 lg:relative + : '-translate-x-[260px] w-[0px]'} w-[260px] min-w[260px] bg-black text-gray-200 shadow-2xl text-sm transition z-40 fixed top-0 left-0 lg:relative " > -