From: Scott Worley Date: Thu, 10 Feb 2022 01:43:56 +0000 (-0800) Subject: Don't assume input is first child X-Git-Url: http://git.scottworley.com/vopamoi/commitdiff_plain/d1d7beafa8295d5060bbe00ce7b8a2bc41495b00 Don't assume input is first child --- 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 &&