diff options
-rw-r--r-- | src/components/ChatView.vue | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/components/ChatView.vue b/src/components/ChatView.vue index b5ee8dc87..d531f53ae 100644 --- a/src/components/ChatView.vue +++ b/src/components/ChatView.vue @@ -134,14 +134,13 @@ export default { }, watch: { - typingParticipants: { + isVisible: { immediate: true, - handler() { - this.$nextTick(() => { - // offset from NewMessage component by 8px, with its min-height: 69px as a fallback - this.scrollButtonOffset = (this.$refs.newMessage?.$el?.clientHeight ?? 69) + 8 - }) - }, + handler: 'setScrollToBottomPosition', + }, + + typingParticipants: { + handler: 'setScrollToBottomPosition', }, }, @@ -186,6 +185,13 @@ export default { smoothScrollToBottom() { EventBus.$emit('smooth-scroll-chat-to-bottom') }, + + setScrollToBottomPosition() { + this.$nextTick(() => { + // offset from NewMessage component by 8px, with its min-height: 69px as a fallback + this.scrollButtonOffset = (this.$refs.newMessage?.$el?.clientHeight ?? 69) + 8 + }) + }, }, } |