aboutsummaryrefslogtreecommitdiff
path: root/src/components/notifications/notifications.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/notifications/notifications.js')
-rw-r--r--src/components/notifications/notifications.js16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/components/notifications/notifications.js b/src/components/notifications/notifications.js
index 2682912a..c3acd9e0 100644
--- a/src/components/notifications/notifications.js
+++ b/src/components/notifications/notifications.js
@@ -119,13 +119,15 @@ const Notifications = {
},
teleportTarget () {
// handle scroller change
- this.scrollerRef.removeEventListener('scroll', this.updateScrollPosition)
- this.scrollerRef = this.$refs.root.closest('.column.-scrollable')
- if (!this.scrollerRef) {
- this.scrollerRef = this.$refs.root.closest('.mobile-notifications')
- }
- this.scrollerRef.addEventListener('scroll', this.updateScrollPosition)
- this.updateScrollPosition()
+ this.$nextTick(() => {
+ this.scrollerRef.removeEventListener('scroll', this.updateScrollPosition)
+ this.scrollerRef = this.$refs.root.closest('.column.-scrollable')
+ if (!this.scrollerRef) {
+ this.scrollerRef = this.$refs.root.closest('.mobile-notifications')
+ }
+ this.scrollerRef.addEventListener('scroll', this.updateScrollPosition)
+ this.updateScrollPosition()
+ })
}
},
methods: {