Skip to content

ConfirmDialog: closing animation is replaced by secondary dialog animation #8533

@icenitipol

Description

@icenitipol

Describe the bug

Bug description

ConfirmDialog closing animation works normally when only one dialog is used.

However, after opening a secondary ConfirmDialog from inside the footer of the main ConfirmDialog, the main dialog closing animation appears to be replaced by the secondary dialog's closing animation.

When the main dialog is closed later, the secondary dialog briefly flashes as a ghost / duplicate popup during the closing animation.

This only happens after the secondary dialog has been opened at least once.

Steps to reproduce

Case 1: Works correctly

  1. Click "Open Main Dialog"
  2. Close the main dialog using the X button, or click "Accept - valid"

Expected:
The main dialog closes with its own normal closing animation.

Actual:
The main dialog closes correctly.

Case 2: Animation bug

  1. Click "Open Main Dialog"
  2. Click "Accept - validation error"
  3. A secondary dialog opens
  4. Close the secondary dialog using the X button, or click OK
  5. Close the main dialog using the X button, or click "Accept - valid"

Expected:
The main dialog should close using its own normal closing animation.

Actual:
The main dialog closing animation appears to be replaced by the secondary dialog's closing animation.
A ghost / duplicate of the secondary dialog briefly flashes while the main dialog is closing.

Important note

The issue does not happen if the main dialog is opened and closed directly.

The issue only happens after the secondary ConfirmDialog has been opened at least once.

Image

Reproducer

https://stackblitz.com/edit/tdzayeo4?file=src%2FApp.jsx

System Information

System:
    OS: Windows 11 10.0.26200
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
    Memory: 11.36 GB / 31.78 GB
  Binaries:
    Node: 22.22.0 - C:\nvm4w\nodejs\node.EXE
    npm: 10.9.4 - C:\nvm4w\nodejs\npm.CMD
  Browsers:
    Chrome: 147.0.7727.117
    Edge: Chromium (143.0.3650.139)
    Internet Explorer: 11.0.26100.8115
  npmPackages:
    primereact: ^10.9.7 => 10.9.7
    react: 19.1.0 => 19.1.0
    tailwindcss: ^4 => 4.1.15

Steps to reproduce the behavior

  1. Click "Open Main Dialog"
  2. Click "Accept - validation error"
  3. A secondary dialog opens
  4. Close the secondary dialog using the X button, or click OK
  5. Close the main dialog using the X button, or click "Accept - valid"

Expected behavior

Only the main dialog should close with a normal closing animation.

Metadata

Metadata

Assignees

Labels

Type: BugIssue contains a defect related to a specific component.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions