mirror of
https://github.com/OpenCut-app/OpenCut.git
synced 2026-07-13 21:52:53 +02:00
codebase overhaul (#697)
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
export function isTypableDOMElement({
|
||||
element,
|
||||
}: {
|
||||
element: HTMLElement;
|
||||
}): boolean {
|
||||
if (element.isContentEditable) return true;
|
||||
|
||||
if (element.tagName === "INPUT") {
|
||||
return !(element as HTMLInputElement).disabled;
|
||||
}
|
||||
|
||||
if (element.tagName === "TEXTAREA") {
|
||||
return !(element as HTMLTextAreaElement).disabled;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
Reference in New Issue
Block a user