Fixed p-trigger conflict
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user