From 4d0f6801a889fd86acabf938f1a967979e55678f Mon Sep 17 00:00:00 2001 From: oxyplay Date: Wed, 15 Nov 2023 07:08:28 +0000 Subject: [PATCH] possible autoscroll treshhold fix --- assets/chat.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/chat.js b/assets/chat.js index 2236fea4..85095358 100644 --- a/assets/chat.js +++ b/assets/chat.js @@ -404,7 +404,7 @@ let isAutoScrollPaused = false; function isScrolledToBottom() { - return chatContent.scrollHeight - chatContent.clientHeight <= chatContent.scrollTop + 1; + return chatContent.scrollHeight - chatContent.clientHeight <= chatContent.scrollTop + 5; } chatContent.addEventListener('scroll', function() { @@ -440,6 +440,7 @@ // new scroll to test function auto_scroll() { input_care(); + console.log('isAutoScrollPaused',isAutoScrollPaused); if (!isAutoScrollPaused) { var currentScroll = chatContent.scrollTop; var distanceToScroll = chatContent.scrollHeight - chatContent.clientHeight - currentScroll;