From 80b1ccb26797079b327fee72d605f3f558a7277d Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Wed, 20 Apr 2022 20:40:10 +0300 Subject: [PATCH] restore old chat inputbox behavior --- src/components/chat/chat.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/chat/chat.js b/src/components/chat/chat.js index 9a0ae10723..02f3a2f27c 100644 --- a/src/components/chat/chat.js +++ b/src/components/chat/chat.js @@ -144,13 +144,13 @@ const Chat = { } this.$nextTick(() => { - const { offsetHeight = undefined } = this.lastScrollPosition + const { scrollHeight = undefined } = this.lastScrollPosition this.lastScrollPosition = getScrollPosition() - const diff = this.lastScrollPosition.offsetHeight - offsetHeight - if (diff < 0 || (!this.bottomedOut() && expand)) { + const diff = this.lastScrollPosition.scrollHeight - scrollHeight + if (diff > 0 || (!this.bottomedOut() && expand)) { this.$nextTick(() => { - window.scrollTo({ top: window.scrollY - diff }) + window.scrollTo({ top: window.scrollY + diff }) }) } })