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.

Prevent `Enter` from preventing default

-2
-1
src/useDialogFocus.ts
··· 154 154 // Move focus to first target when Enter is pressed 155 155 const newTarget = getFirstFocusTarget(ref.current); 156 156 if (newTarget) { 157 - event.preventDefault(); 158 157 willReceiveFocus = true; 159 158 newTarget.focus(); 160 159 }
-1
src/useMenuFocus.ts
··· 100 100 event.code === 'Enter' 101 101 ) { 102 102 // Move focus to first target when enter is pressed 103 - event.preventDefault(); 104 103 const newTarget = getFirstFocusTarget(ref.current); 105 104 if (newTarget) newTarget.focus(); 106 105 } else if (