chore(useKeyPress): prevent event swallowing for buttons #5037

This commit is contained in:
moklick
2025-03-26 09:26:36 +01:00
parent 8092374a13
commit 11dfc46e84
+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'];
const inputTags = ['INPUT', 'SELECT', 'TEXTAREA', 'BUTTON'];
export function isInputDOMNode(event: KeyboardEvent): boolean {
// using composed path for handling shadow dom