From 4276cd68e968a4da7314e700a8e90ef3facefb00 Mon Sep 17 00:00:00 2001 From: Oliver Blanthorn Date: Wed, 27 May 2020 12:56:48 +0100 Subject: [PATCH] Stop TS breaking everything This is very annoying - I built this, it worked, but `tslint` changed ['readOnly'] to .readOnly and broke Tridactyl --- src/lib/dom.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/dom.ts b/src/lib/dom.ts index b70841ad..597d04fc 100644 --- a/src/lib/dom.ts +++ b/src/lib/dom.ts @@ -23,7 +23,7 @@ const logger = new Logging.Logger("dom") */ export function isTextEditable(element: Element) { if (element) { - if (element.readOnly === true) return false + if ((element as any).readOnly === true) return false // HTML is always upper case, but XHTML is not necessarily upper case if (element.nodeName.toUpperCase() === "INPUT") { return isEditableHTMLInput(element as HTMLInputElement)