mirror of
https://github.com/outline/outline.git
synced 2026-11-28 00:09:58 +03:00
fix: Cannot read properties of undefined on old Android
This commit is contained in:
1 parent
17e55832ac
commit
ff284db3f9
1 file changed
+3
-2
@@ -1,8 +1,9 @@
|
||||
const inputs = ["input", "select", "button", "textarea"]; // detect if node is a text input element
|
||||
|
||||
export default function isTextInput(element: HTMLElement): boolean {
|
||||
return (
|
||||
export default function isTextInput(element: Element): boolean {
|
||||
return !!(
|
||||
element &&
|
||||
element.tagName &&
|
||||
(inputs.indexOf(element.tagName.toLowerCase()) !== -1 ||
|
||||
element.attributes.getNamedItem("role")?.value === "textbox" ||
|
||||
element.attributes.getNamedItem("contenteditable")?.value === "true")
|
||||
|
||||
Reference in new issue
Block a user