Replies: 2 comments 2 replies
-
it's on the document level for a11y reasons, if a dropdown menu is inside a dialog, pressing escape should only close the dropdown and pressing it again wld close the dialog. radix manages this layering for you but if it isn working, you've likely stumbled upon this bug #1088 |
Beta Was this translation helpful? Give feedback.
2 replies
-
Closing, addressed in #2653 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
Recently I've found out that Escape key is handled seprately for components like DropdownMenu and event handler for it is attached to document instead of a Content element.
Imagine a scenario where DropdownMenu is rendered inside a Parent component which also listens to escape and closes itself. How would I properly stop event propagation and close only DropdownMenu since doing something like
<DropdownMenu.Content onKeyDown={(e)=>e.stopPropagation()}
breaks it completely ?Thanks in advance for any tips
Beta Was this translation helpful? Give feedback.
All reactions