aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/components/chat/chat.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/components/chat/chat.js b/src/components/chat/chat.js
index 9a0ae107..02f3a2f2 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 })
})
}
})