Skip to content

Commit

Permalink
fix: #12948 || Overlay: p-overlay div not removed from DOM on hiding …
Browse files Browse the repository at this point in the history
…panel
  • Loading branch information
ashikjs committed Sep 27, 2023
1 parent e3a643c commit 5d30d6f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/components/overlay/overlay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { CommonModule, DOCUMENT, isPlatformBrowser } from '@angular/common';
import {
AfterContentInit,
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
ContentChildren,
ElementRef,
Expand Down Expand Up @@ -65,7 +66,7 @@ const hideOverlayContentAnimation = animation([animate('{{hideTransitionParams}}
'p-overlay-right-start': modal && overlayResponsiveDirection === 'right-start',
'p-overlay-right-end': modal && overlayResponsiveDirection === 'right-end'
}"
(click)="onOverlayClick($event)"
(click)="onOverlayClick()"
>
<div
*ngIf="visible"
Expand Down Expand Up @@ -422,6 +423,7 @@ export class Overlay implements AfterContentInit, OnDestroy {
public renderer: Renderer2,
private config: PrimeNGConfig,
public overlayService: OverlayService,
public cd: ChangeDetectorRef,
private zone: NgZone
) {
this.window = this.document.defaultView;
Expand Down Expand Up @@ -524,6 +526,7 @@ export class Overlay implements AfterContentInit, OnDestroy {
DomHandler.appendOverlay(this.overlayEl, this.targetEl, this.appendTo);
ZIndexUtils.clear(container);
this.modalVisible = false;
this.cd.markForCheck();

break;
}
Expand Down

0 comments on commit 5d30d6f

Please sign in to comment.