primefaces / primeng

The Most Complete Angular UI Component Library
https://primeng.org
Other
10.35k stars 4.58k forks source link

Component: DynamicDialog not working with zonejs less application #16402

Open Trolejbus opened 1 month ago

Trolejbus commented 1 month ago

Describe the bug

I am not sure if PrimeNg lib is adapted to work with zonejs less Angular application (with provideExperimentalZonelessChangeDetection()), but if so than after closing dynamic dialog with overlay mask behind it, dialog is correctly closed, but overlay is not destroyed from html.

Environment

Windows/Chrome 128.0.6613.138

Reproducer

https://stackblitz.com/edit/stackblitz-starters-tpcpxh?file=src%2Fmain.ts

Angular version

18.0.2

PrimeNG version

17.18.10

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

v20.10.0

Browser(s)

Chrome 128.0.6613.138

Steps to reproduce the behavior

  1. Navigate to provided stackblitz
  2. Click "Open dialog" button.
  3. Close dialog.
  4. Click "Open dialog" button again. - it should not be possible since overlay is not allowing to click button.

Uncommenting commented code fixes issue.

Expected behavior

Overlay should be destroyed after closing dialog.

juanchavezlive commented 5 days ago

Same error here. Had to remove Zoneless support

Trolejbus commented 2 days ago

Same error here. Had to remove Zoneless support

Hey, you can check my example. In this particular issue you can trigger change detection manually as a potential workaround for this issue :)