Comments are reverse

This commit is contained in:
Cohee 2024-07-23 15:53:59 +03:00 committed by GitHub
parent e84d023191
commit 9b97d88aee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -9261,12 +9261,12 @@ jQuery(async function () {
const scrollIsAtBottom = Math.abs(chatElementScroll.scrollHeight - chatElementScroll.clientHeight - chatElementScroll.scrollTop) < 1;
// Cancel autoscroll if the user scrolls up
// Resume autoscroll if the user scrolls to the bottom
if (scrollLock && scrollIsAtBottom) {
scrollLock = false;
}
// Resume autoscroll if the user scrolls to the bottom
// Cancel autoscroll if the user scrolls up
if (!scrollLock && !scrollIsAtBottom) {
scrollLock = true;
}