From 5798e554c1c4b9a5caadbdc938583989b0ff4bf5 Mon Sep 17 00:00:00 2001 From: gamerish96 <96ed@live.it> Date: Thu, 5 Oct 2023 11:37:00 +0200 Subject: [PATCH] Fixed OverlayPanel containing component Fixes case when a component is present inside the OverlayPanel. After a low number of clicks inside the OverlayPanel it hid randomically. --- src/app/components/overlaypanel/overlaypanel.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/components/overlaypanel/overlaypanel.ts b/src/app/components/overlaypanel/overlaypanel.ts index dc54dc80eac..d331b0b425a 100755 --- a/src/app/components/overlaypanel/overlaypanel.ts +++ b/src/app/components/overlaypanel/overlaypanel.ts @@ -229,7 +229,7 @@ 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.contains(event.target)) { + if (!this.container?.contains(event.target) && this.target !== event.target && !this.target.contains(event.target)) { this.hide(); }