From e4e6882f1240f1c1c2d2142e8520f636ad6d65ab Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Wed, 1 May 2024 14:56:55 +0300 Subject: [PATCH] Fix scroll to bottom on chat open --- public/script.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/script.js b/public/script.js index 4d2411549..d9690b694 100644 --- a/public/script.js +++ b/public/script.js @@ -1607,7 +1607,7 @@ export async function printMessages() { for (let i = startIndex; i < chat.length; i++) { const item = chat[i]; - addOneMessage(item, { scroll: i === chat.length - 1, forceId: i, showSwipes: false }); + addOneMessage(item, { scroll: false, forceId: i, showSwipes: false }); } // Scroll to bottom when all images are loaded @@ -1629,6 +1629,7 @@ export async function printMessages() { $('#chat .mes').last().addClass('last_mes'); hideSwipeButtons(); showSwipeButtons(); + scrollChatToBottom(); function incrementAndCheck() { imagesLoaded++;