From b5a106198e7631467ab5cfdf768e357712e4c7c6 Mon Sep 17 00:00:00 2001 From: Cagatay Civici Date: Wed, 24 Aug 2022 00:52:27 +0300 Subject: [PATCH 1/2] Fixed p-trigger conflict --- src/app/layout/app.layout.component.ts | 4 ++-- src/app/layout/app.topbar.component.html | 6 +++--- src/app/layout/app.topbar.component.ts | 6 +++++- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/app/layout/app.layout.component.ts b/src/app/layout/app.layout.component.ts index 6ffab31..4b52dd9 100644 --- a/src/app/layout/app.layout.component.ts +++ b/src/app/layout/app.layout.component.ts @@ -27,7 +27,7 @@ export class AppLayoutComponent implements OnDestroy { if (!this.menuOutsideClickListener) { this.menuOutsideClickListener = this.renderer.listen('document', 'click', event => { const isOutsideClicked = !(this.appSidebar.el.nativeElement.isSameNode(event.target) || this.appSidebar.el.nativeElement.contains(event.target) - || event.target.classList.contains('p-trigger') || event.target.parentNode.classList.contains('p-trigger')); + || this.appTopbar.menuButton.nativeElement.isSameNode(event.target) || this.appTopbar.menuButton.nativeElement.contains(event.target)); if (isOutsideClicked) { this.hideMenu(); @@ -38,7 +38,7 @@ export class AppLayoutComponent implements OnDestroy { if (!this.profileMenuOutsideClickListener) { this.profileMenuOutsideClickListener = this.renderer.listen('document', 'click', event => { const isOutsideClicked = !(this.appTopbar.menu.nativeElement.isSameNode(event.target) || this.appTopbar.menu.nativeElement.contains(event.target) - || event.target.classList.contains('p-trigger') || event.target.parentNode.classList.contains('p-trigger')); + || this.appTopbar.topbarMenuButton.nativeElement.isSameNode(event.target) || this.appTopbar.topbarMenuButton.nativeElement.contains(event.target)); if (isOutsideClicked) { this.hideProfileMenu(); diff --git a/src/app/layout/app.topbar.component.html b/src/app/layout/app.topbar.component.html index efc269a..c748da9 100644 --- a/src/app/layout/app.topbar.component.html +++ b/src/app/layout/app.topbar.component.html @@ -4,15 +4,15 @@ SAKAI - - -
+