primeng icon indicating copy to clipboard operation
primeng copied to clipboard

ConfirmationService: Cannot show multiple dialogs in quick succession

Open davidda opened this issue 1 year ago • 1 comments

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(...)

davidda avatar Jun 28 '24 07:06 davidda

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

quentin-ineat-ca avatar Jun 28 '24 18:06 quentin-ineat-ca

+1

raiworld81 avatar Jul 25 '24 10:07 raiworld81

Hi,

So sorry for the delayed response! Improvements have been made to many components recently, both in terms of performance and enhancement. Therefore, this improvement may have been developed in another issue ticket without realizing it. You can check this in the documentation. If there is no improvement on this, can you open a new issue so we can include it in our roadmap?

Thanks a lot for your understanding! Best Regards,

mertsincan avatar Dec 16 '24 11:12 mertsincan