]> git.scottworley.com Git - vopamoi/commitdiff
Don't assume input is first child
authorScott Worley <scottworley@scottworley.com>
Thu, 10 Feb 2022 01:43:56 +0000 (17:43 -0800)
committerScott Worley <scottworley@scottworley.com>
Thu, 10 Feb 2022 17:51:51 +0000 (09:51 -0800)
vopamoi.ts

index ad7a93e7928c503c596c44b7414f1a9eac5a0cd4..bc399bcb0936153b0dcdf694af01f969b3fbc1b0 100644 (file)
@@ -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.
     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 &&
       if (
         input.value === target.getAttribute("data-description") &&
         input.selectionStart === input.value.length &&