primevue
primevue copied to clipboard
Dialog: Nested dialogs are closed together when they are closed with the ESC key
Describe the bug
Nested dialogs are closed together when they are closed with the ESC key
Reproducer
https://stackblitz.com/edit/primevue-4-vite-issue-template-vdtvrs?file=src%2FApp.vue
PrimeVue version
4.0.5
Vue version
4.x
Language
ALL
Build / Runtime
Vue CLI App
Browser(s)
No response
Steps to reproduce the behavior
No response
Expected behavior
No response
@gaecfov
On my side I have 2 dialogs (Dialog Parent and dialog Child).
On Dialog Parent I have:
:closeOnEscape="canCloseOnEscape"
On Dialog Child I have:
:closeOnEscape="true"
On the Parent Dialog, canCloseOnEscape is true by default.
Now, the moment I show my child dialog I set canCloseOnEscape (Parent Dialog) to false and the moment I close my child dialog I again set my canCloseOnEscape (Parent Dialog) to true.
@cagataycivici @tugcekucukoglu
Steps to Reproduce:
- Set
:closeOnEscape="true"and :closable="false" in the dialog component. - The escape key no longer closes the dialog as expected. It seems like the
closableprop might be conflicting with thecloseOnEscapefunctionality.
Expected Behavior:
- The dialog should close when the escape key is pressed, regardless of the
closablesetting if:closeOnEscape="true"is set.
It would be great if this issue could be looked into or let me know if I should create separate issue for that, Thank you!
Also running into this issue.
Same here. I also have another issue which might be related: when the child dialog closes, I instruct it to emit a custom signal with a value. The parent dialog never receives that signal. The signal is emitted upon the child's @hide signal.
Related to this, the preview for the Image component also has this same issue. If an Image is inside a Dialog, when user presses esc inside the image preview, the dialog closes.