restore old chat inputbox behavior

This commit is contained in:
Henry Jameson 2022-04-20 20:40:10 +03:00
parent e388dbc168
commit 80b1ccb267

View file

@ -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 })
})
}
})