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

The dialog plugin should not handle Esc key press if already prevent defaulted by the guest view #17343

Closed
oleq opened this issue Oct 28, 2024 · 0 comments · Fixed by #17344
Closed
Assignees
Labels
package:ui type:bug This issue reports a buggy (incorrect) behavior.

Comments

@oleq
Copy link
Member

oleq commented Oct 28, 2024

📝 Provide detailed reproduction steps (if any)

  1. Create a dialog with a view that listens to Esc keydown and preventDefaults() it to manage its internal logic.
  2. Open the dialog and press Esc.

✔️ Expected result

The dialog should not close. The Esc key press should be handled by the guest (child view).

❌ Actual result

The dialog closes making it impossible for the guest views to interact with Esc without stopPropagation().

❓ Possible solution

Use defaultPrevented flag in the dialog logic to discover if the event has been handled or not.


If you'd like to see this fixed sooner, add a 👍 reaction to this post.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:ui type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
2 participants