This commit is contained in:
Timothy J. Baek 2024-05-19 07:40:54 -07:00
parent ae35c68956
commit 1fb5ef99e2

View File

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