summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaksim Sukharev <antreesy.web@gmail.com>2023-08-09 11:47:55 +0200
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>2023-08-09 13:13:32 +0000
commite6c175272c1dd800022234621f845460cd68ecf5 (patch)
tree2626e95d74aabce0d86a39fc5061df312e267d3c
parent8b5d7a3c00c628593d8b80a6b520bfe25b9523b8 (diff)
add additional check of button position for ChatView in RightSidebar
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
-rw-r--r--src/components/ChatView.vue20
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
+ })
+ },
},
}