This commit is contained in:
Timothy J. Baek 2024-05-19 07:40:54 -07:00
parent ae35c68956
commit 1fb5ef99e2
1 changed files with 8 additions and 7 deletions

View File

@ -361,13 +361,14 @@
history: history
});
const element = document.getElementById('messages-container');
autoScroll =
element.scrollHeight - element.scrollTop <= element.clientHeight + 50;
setTimeout(() => {
scrollToBottom();
}, 100);
if (autoScroll) {
const element = document.getElementById('messages-container');
autoScroll =
element.scrollHeight - element.scrollTop <= element.clientHeight + 50;
setTimeout(() => {
scrollToBottom();
}, 100);
}
}}
/>
{/key}