Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dialog: closeOnEscape is not working when closable is false #6922

Closed
borisragaji opened this issue Dec 4, 2024 · 2 comments · Fixed by #7094
Closed

Dialog: closeOnEscape is not working when closable is false #6922

borisragaji opened this issue Dec 4, 2024 · 2 comments · Fixed by #7094
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@borisragaji
Copy link

Describe the bug

Following API documentation from the https://primevue.org/dialog/#api.dialog.props I faced with unexpected behavior of Dialog component.
I wanted to use Dialog: without closable button "X", with possibility to close Dialog on Escape button, also on clicking to the background which is disabled using modal prop. Removing "X" button will block functionality of the Escape button and focus will be lost in background until components within Dialog comes to their turn to be focused.

Reproducer

https://stackblitz.com/edit/primevue-nuxt-issue-template-4yg7uf?file=app.vue

PrimeVue version

^4.1.1

Vue version

4.x

Language

TypeScript

Build / Runtime

Nuxt

Browser(s)

Firefox 133.0

Steps to reproduce the behavior

First case

  1. Click on "Show" button
  2. Try to close Dialog clicking Escape button

Second case

  1. Click on "Show" button
  2. Click Tab button to change focus -> it will goes to the table instead of the components within the Dialog

Expected behavior

Removing "X" button from the dialog with Dialog prop "closable", I want to be able to use Escape button and it's behavior (closing dialog). Also, after opening the Dialog, I expect to focus be inside of the Dialog on very start, not to go outside of it.

Thanks for everything! :-)

@borisragaji borisragaji added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Dec 4, 2024
@tugcekucukoglu tugcekucukoglu added Resolution: Help Wanted Issue or pull request requires extra help and feedback and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Dec 10, 2024
Copy link

Due to PrimeVue team's busy roadmap, this issue is available for anyone to work on. Make sure to reference this issue in your pull request. ✨ Thank you for your contribution! ✨

@J-Michalek
Copy link
Contributor

I will try to look into this.

@tugcekucukoglu tugcekucukoglu changed the title Component Name: "Dialog" Issue Title: Unexpected behavior with speciffic set of Dialog props Dialog: closeOnEscape is not working when closable is false Jan 15, 2025
@tugcekucukoglu tugcekucukoglu self-assigned this Jan 15, 2025
@tugcekucukoglu tugcekucukoglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Resolution: Help Wanted Issue or pull request requires extra help and feedback labels Jan 15, 2025
@tugcekucukoglu tugcekucukoglu added this to the 4.3.0 milestone Jan 15, 2025
@github-project-automation github-project-automation bot moved this to Review in PrimeVue Jan 15, 2025
@github-project-automation github-project-automation bot moved this from Review to Done in PrimeVue Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants