diff --git a/src/app/header/header.component.ts b/src/app/header/header.component.ts index 4bc159d..734ff54 100644 --- a/src/app/header/header.component.ts +++ b/src/app/header/header.component.ts @@ -104,6 +104,7 @@ export class HeaderComponent implements OnInit, OnDestroy { public closeDropdown(): void { this.profileDropdownState = false; } + public loginPopupStateChange(state: boolean): void { if (state) { this.createLoginPopup(); @@ -186,6 +187,12 @@ export class HeaderComponent implements OnInit, OnDestroy { this.myProfileComponent.instance.state = true; this.myProfileComponent.instance.user = this.loggedUser; + this.myProfileComponent.instance.ignoreClickOutside = [ + this.profileBtnElementRef, + this.profileDropdownElementRef, + this.userElementRef, + ].map((element) => element.nativeElement); + this.myProfileComponent.instance.stateChange.subscribe((state) => { if (!state) { this.closeMyProfilePopup(); @@ -202,6 +209,12 @@ export class HeaderComponent implements OnInit, OnDestroy { this.viewContainerRef.createComponent(HelpComponent); this.helpComponent.instance.state = true; + this.helpComponent.instance.ignoreClickOutside = [ + this.profileBtnElementRef, + this.profileDropdownElementRef, + this.userElementRef, + ].map((element) => element.nativeElement); + this.helpComponent.instance.stateChange.subscribe((state) => { if (!state) { this.closeHelpPopup();