You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 5, 2023. It is now read-only.
We need to add a way for UI components to prevent their own Escape key functionality from conflicting with that of the Modal component. Currently, pressing the Escape key to close e.g. a Select menu that lives within a modal will also close the modal, which is unexpected and frustrating to users.
The easiest way to achieve this would probably be to change global useEventListener hooks to regular onKeyDown props on wrapper components, so that the events can be stopped from propagating once they've been handled. Or maybe we just need to declare a more specific targetElement for the useEventListener hooks so they're not global and can be cancelled.
Separate handling may be needed for our generic Popover/Tooltip escape key listener, as it can't rely on a single wrapper element and needs to be global.