fix scrollerref not setting properly
This commit is contained in:
parent
8c4de692f4
commit
1c459028cc
1 changed files with 9 additions and 7 deletions
|
@ -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: {
|
||||
|
|
Loading…
Reference in a new issue