feat: change scroll behavior

This commit is contained in:
dvorakchen
2024-06-23 14:11:14 +08:00
parent 56b3d218e6
commit c61c500427
@@ -20,10 +20,7 @@
}
function scrollToNewestMessage() {
let lastChild = messagesBox.lastElementChild;
if (lastChild) {
lastChild.scrollIntoView({ behavior: "smooth" });
}
messagesBox.scrollTo({top: messagesBox.scrollHeight, behavior: 'smooth'});
}
function appendMyNewMessage(message) {