Skip to content

Commit

Permalink
fix overlay panel closes when subelements are clicked (#14177)
Browse files Browse the repository at this point in the history
  • Loading branch information
pete-mcwilliams committed Nov 28, 2023
1 parent 0c7b6a4 commit e42a2ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/components/overlaypanel/overlaypanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,10 @@ export class OverlayPanel implements AfterContentInit, OnDestroy {
const documentTarget: any = this.el ? this.el.nativeElement.ownerDocument : this.document;

this.documentClickListener = this.renderer.listen(documentTarget, documentEvent, (event) => {
if (!this.container?.contains(event.target) && this.target !== event.target && !this.target.contains(event.target)) {
if (!this.container?.contains(event.target) && this.target !== event.target && !this.target.contains(event.target) && !this.selfClick) {
this.hide();
}

this.selfClick = false;
this.cd.markForCheck();
});
}
Expand Down

0 comments on commit e42a2ea

Please sign in to comment.