Skip to content

Commit

Permalink
fix(MessagesList): show 'scroll to bottom' only if there is an actual…
Browse files Browse the repository at this point in the history
… scroll up

Signed-off-by: Maksim Sukharev <[email protected]>
  • Loading branch information
Antreesy committed Feb 21, 2025
1 parent ae57db2 commit b38f22a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/MessagesList/MessagesList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -936,7 +936,9 @@ export default {
return
}

this.setChatScrolledToBottom(false)
if (scrollHeight > clientHeight && this.isScrolling === 'up') {
this.setChatScrolledToBottom(false)
}

if ((scrollHeight > clientHeight && scrollTop < 800 && this.isScrolling === 'up')
|| skipHeightCheck) {
Expand Down Expand Up @@ -1339,6 +1341,7 @@ export default {
return
}

this.isScrolling = 'up'
this.debounceHandleScroll({ skipHeightCheck: true })
}
},
Expand Down

0 comments on commit b38f22a

Please sign in to comment.