From 8f1ccd12e05877c8f3876d6dc60fd23f4c94403e Mon Sep 17 00:00:00 2001 From: Roardom Date: Mon, 13 Nov 2023 04:23:54 +0000 Subject: [PATCH] fix: chatbox always scrolling to bottom The logic behind the chatbox is very difficult to understand, but from what I can tell, we shouldn't be scrolling if we're frozen and the scrolling wasn't forced. In such a case, return early instead. --- resources/js/components/chat/Chatbox.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/resources/js/components/chat/Chatbox.vue b/resources/js/components/chat/Chatbox.vue index 451bccf53..5f3daaaba 100644 --- a/resources/js/components/chat/Chatbox.vue +++ b/resources/js/components/chat/Chatbox.vue @@ -1071,10 +1071,14 @@ export default { if (container === null) return; - if (this.forced != false && force != true && this.frozen) return; + if (!this.forced && !force && this.frozen) return; if (this.scroll || force) { - container.animate({ scrollTop: container.scrollHeight }, 0); + container.animate({ + scrollTop: container.scrollHeight + }, { + duration: 0 + }); } container.scroll({