fix scrollerref not setting properly

This commit is contained in:
Henry Jameson 2022-09-28 21:23:27 +03:00
parent 8c4de692f4
commit 1c459028cc

View file

@ -119,6 +119,7 @@ const Notifications = {
},
teleportTarget () {
// handle scroller change
this.$nextTick(() => {
this.scrollerRef.removeEventListener('scroll', this.updateScrollPosition)
this.scrollerRef = this.$refs.root.closest('.column.-scrollable')
if (!this.scrollerRef) {
@ -126,6 +127,7 @@ const Notifications = {
}
this.scrollerRef.addEventListener('scroll', this.updateScrollPosition)
this.updateScrollPosition()
})
}
},
methods: {