From cdb4e02413fb6098c3d2afce3177722038b89099 Mon Sep 17 00:00:00 2001 From: hippoz <10706925-hippoz@users.noreply.gitlab.com> Date: Thu, 1 Sep 2022 19:21:10 +0300 Subject: [PATCH] fix autoscroll not working in certain cases --- frontend/src/components/Messages.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/Messages.svelte b/frontend/src/components/Messages.svelte index 9e21775..645c745 100644 --- a/frontend/src/components/Messages.svelte +++ b/frontend/src/components/Messages.svelte @@ -26,7 +26,7 @@ const onScroll = (e) => { const { scrollTop, offsetHeight, scrollHeight } = e.target; - if ((scrollTop + offsetHeight) >= scrollHeight) { // user scrolled to bottom + if ((scrollTop + offsetHeight) >= (scrollHeight - 10)) { // user scrolled to bottom messages.setIsCollectingOldMessages(true); shouldAutoscroll = true; isScrolledToBottom = true;