primefaces / primeng

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

ConfirmationService: Cannot show multiple dialogs in quick succession #15916

Open davidda opened 3 months ago

davidda commented 3 months ago

Describe the bug

Calling confirmationService.confirm(...) twice in quick succession will cause the second dialog to not be opened at all or immediately close itself. Only a generous setTimeout of 100ms to 500ms depending on browser speed will fix this.

Environment

-

Reproducer

https://stackblitz.com/edit/xcaun3?file=src%2Fapp%2Fconfirm-dialog-basic-demo.ts

Angular version

17+

PrimeNG version

17.18.1

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

18.6.1

Browser(s)

No response

Steps to reproduce the behavior

  1. Click on button "Does not work". Confirm "Yes" => Second dialog does not show.
  2. Click on button "Works". Confirm "Yes" => Second dialog shows after timeout.

Expected behavior

There should be no time delay needed between two calls of confirmationService.confirm(...)

quentin-ineat-ca commented 3 months ago

Agree. Same one I opened here : https://github.com/primefaces/primeng/issues/15725

raiworld81 commented 2 months ago

+1