Closed eridanurce closed 9 months ago
This seems to be the root cause for the event being propagated: https://github.com/microsoft/fluentui/pull/29262 @bsunderhus can you provide some insight into why this change was made?
Hey @eridanurce, few reasons:
<dialog>
element does. There's no stop propagation for the closing of a modal in the Escape
press. Preventing the event is enough to stop the modal from closing, here's an example
<dialog>
<dialog>
does.Note: I'm aware that a popover and a dialog are not equivalent, but the native
<dialog>
element is the closest we have on a native level to build a popover/modal
This issue has been automatically marked as stale because it has marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thank you for your contributions to Fluent UI!
Library
React Components / v9 (@fluentui/react-components)
System Info
Are you reporting Accessibility issue?
no
Reproduction
https://codesandbox.io/p/sandbox/menu-propagates-esc-5fr3py
Bug Description
Actual Behavior
When the menu is opened and Esc is pressed on the keyboard, the menu is closed but Esc keydown event is still propagated.
Expected Behavior
After the Esc keydown is consumed to close the menu, the event should not be propagated.
Logs
No response
Requested priority
High
Products/sites affected
Dynamics 365 Business Central
Are you willing to submit a PR to fix?
no
Validations