Fixed scrolled to bottom check

This commit is contained in:
BordedDev 2025-07-19 00:13:06 +02:00
parent 11e19f48e8
commit ac47d201d8

View File

@ -191,7 +191,7 @@ class MessageList extends HTMLElement {
return this.isElementVisible(this.firstElementChild);
}
scrollToBottom(force = false, behavior= 'instant') {
if (force || this.isScrolledToBottom()) {
if (force || !this.isScrolledToBottom()) {
this.firstElementChild.scrollIntoView({ behavior, block: 'start' });
setTimeout(() => {
this.firstElementChild.scrollIntoView({ behavior, block: 'start' });