Mirror: React hooks for accessible, common web interactions. UI super powers without the UI.

Remove defaultPrevented exception from useDialogDismiss' onKey

Changed files
+1 -3
src
+1 -3
src/useDialogDismiss.ts
···
if (!ref.current || !hasPriority) return;
function onKey(event: KeyboardEvent) {
-
if (event.defaultPrevented || event.isComposing) return;
-
-
if (event.code === 'Escape') {
+
if (!event.isComposing && event.code === 'Escape') {
// The current dialog can be dismissed by pressing escape if it either has focus
// or it has priority
const active = document.activeElement;