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

Configure Feed

Select the types of activity you want to include in your feed.

Remove defaultPrevented exception from useDialogDismiss' onKey

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