Skip to content

ConfirmDialog and ConfirmPopup: Accept and Reject are not properly debounced #8557

@Altareos

Description

@Altareos

Describe the bug

When clicking on the accept or reject buttons twice relatively fast, the callback is invoked twice. The second call causes errors in my application.

Pull Request Link

No response

Reason for not contributing a PR

  • Lack of time
  • Unsure how to implement the fix/feature
  • Difficulty understanding the codebase
  • Other

Other Reason

No response

Reproducer

https://stackblitz.com/edit/rmtuvyl8?file=src%2FApp.vue

Environment

My project uses Nuxt 4.2.1 and a slightly outdated version of primevue (because enterprise environment), but I've been able to reproduce the issue on the docs site and in the default stackblitz example.

Vue version

3.5.24

PrimeVue version

4.4.1

Node version

No response

Browser(s)

No response

Steps to reproduce the behavior

  1. Open a confirm dialog or popup
  2. Position the cursor over the accept or reject button and double click fast (this is easier on a touchpad, but can happen with a regular mouse)
  3. The confirmation callback is ran twice (two toasts for example)

Expected behavior

The callback should only run once per display of the confirmation dialog or popup.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: Needs TriageIssue will be reviewed by Core Team and a relevant label will be added as soon as possible

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions