Skip to content

Commit

Permalink
#2466 - Chat auto-scroll issue (#2468)
Browse files Browse the repository at this point in the history
* chat auto-scroll on new message issue

* add a comment
  • Loading branch information
SebinSong authored Dec 17, 2024
1 parent 2223594 commit df255f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/views/containers/chatroom/ChatMain.vue
Original file line number Diff line number Diff line change
Expand Up @@ -984,8 +984,8 @@ export default ({
if (addedOrDeleted === 'ADDED' && this.messages.length) {
const isScrollable = this.$refs.conversation &&
this.$refs.conversation.scrollHeight !== this.$refs.conversation.clientHeight
const fromOurselves = this.isMsgSender(this.messages[this.messages.length - 1].from)
if (!fromOurselves && isScrollable) {
if (isScrollable) {
// Auto-scroll to the bottom when a new message is added
this.updateScroll()
} else {
// If there are any temporary messages that do not exist in the
Expand Down

0 comments on commit df255f8

Please sign in to comment.