reroute
This commit is contained in:
8
src/components/article/searchFocus.js
Normal file
8
src/components/article/searchFocus.js
Normal file
@@ -0,0 +1,8 @@
|
||||
const FOCUSABLE =
|
||||
'a, button, input, textarea, select, [role="button"], [role="menuitem"], [tabindex]:not([tabindex="-1"]), [contenteditable="true"]';
|
||||
|
||||
/** Keep the search field focused when clicking non-interactive chrome. */
|
||||
export function preserveSearchFocus(e) {
|
||||
if (e.target.closest(FOCUSABLE)) return;
|
||||
e.preventDefault();
|
||||
}
|
||||
Reference in New Issue
Block a user