diff options
| author | Henry Jameson <me@hjkos.com> | 2022-04-20 20:40:10 +0300 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2022-04-20 20:40:10 +0300 |
| commit | 80b1ccb26797079b327fee72d605f3f558a7277d (patch) | |
| tree | 02828de31413c6bde6e977c8848429a73d763cca /src/components/chat/chat.js | |
| parent | e388dbc168ae466e6745588df0498ee0036d6eb1 (diff) | |
restore old chat inputbox behavior
Diffstat (limited to 'src/components/chat/chat.js')
| -rw-r--r-- | src/components/chat/chat.js | 8 |
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 }) }) } }) |
