commit: 80b1ccb26797079b327fee72d605f3f558a7277d
parent e388dbc168ae466e6745588df0498ee0036d6eb1
Author: Henry Jameson <me@hjkos.com>
Date: Wed, 20 Apr 2022 20:40:10 +0300
restore old chat inputbox behavior
Diffstat:
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git 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 })
})
}
})