From d1d7beafa8295d5060bbe00ce7b8a2bc41495b00 Mon Sep 17 00:00:00 2001 From: Scott Worley Date: Wed, 9 Feb 2022 17:43:56 -0800 Subject: [PATCH] Don't assume input is first child --- vopamoi.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vopamoi.ts b/vopamoi.ts index ad7a93e..bc399bc 100644 --- a/vopamoi.ts +++ b/vopamoi.ts @@ -76,7 +76,7 @@ const Model = { if (!target) return null; if (target.hasAttribute("data-description")) { // Oh no: An edit has arrived from a replica while a local edit is in progress. - const input = target.firstChild as HTMLInputElement; + const input = target.getElementsByTagName("input")[0]!; if ( input.value === target.getAttribute("data-description") && input.selectionStart === input.value.length && -- 2.44.1