refactor(useKeyPress): update preventDefault handling

This commit is contained in:
moklick
2025-03-27 10:55:22 +01:00
parent 5d15b01ba8
commit 238664e322
2 changed files with 13 additions and 3 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ export const getDimensions = (node: HTMLDivElement): Dimensions => ({
export const getHostForElement = (element: HTMLElement | EventTarget | null): Document | ShadowRoot =>
((element as Partial<HTMLElement> | null)?.getRootNode?.() as Document | ShadowRoot) || window?.document;
const inputTags = ['INPUT', 'SELECT', 'TEXTAREA', 'BUTTON'];
const inputTags = ['INPUT', 'SELECT', 'TEXTAREA'];
export function isInputDOMNode(event: KeyboardEvent): boolean {
// using composed path for handling shadow dom