From 6e613df63fb4735909b8725a455c14cf6ed88306 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 7 Nov 2023 11:19:17 +0100 Subject: [PATCH] Fix notification scrolling --- client/src/app/menu/notification.component.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/src/app/menu/notification.component.ts b/client/src/app/menu/notification.component.ts index 0beac69be..2f1557120 100644 --- a/client/src/app/menu/notification.component.ts +++ b/client/src/app/menu/notification.component.ts @@ -66,20 +66,20 @@ export class NotificationComponent implements OnInit, OnDestroy { onPopoverShown () { this.opened = true - document.querySelector('menu').scrollTo(0, 0) // Reset menu scroll to easy lock - document.querySelector('menu').addEventListener('scroll', this.onMenuScrollEvent) + document.querySelector('nav').scrollTo(0, 0) // Reset menu scroll to easy lock + document.querySelector('nav').addEventListener('scroll', this.onMenuScrollEvent) } onPopoverHidden () { this.loaded = false this.opened = false - document.querySelector('menu').removeEventListener('scroll', this.onMenuScrollEvent) + document.querySelector('nav').removeEventListener('scroll', this.onMenuScrollEvent) } // Lock menu scroll when menu scroll to avoid fleeing / detached dropdown onMenuScrollEvent () { - document.querySelector('menu').scrollTo(0, 0) + document.querySelector('nav').scrollTo(0, 0) } onNotificationLoaded () {