logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://hacktivis.me/git/pleroma-fe.git
commit: 1c459028cc8670e1644c314279097fe20d0d9341
parent 8c4de692f462552a7416540392df0f2a260fe817
Author: Henry Jameson <me@hjkos.com>
Date:   Wed, 28 Sep 2022 21:23:27 +0300

fix scrollerref not setting properly

Diffstat:

Msrc/components/notifications/notifications.js16+++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)

diff --git 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: {