]> git.scottworley.com Git - vopamoi/blobdiff - vopamoi.ts
Don't assume input is first child
[vopamoi] / 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.
-      const input = target.firstChild as HTMLInputElement;
+      const input = target.getElementsByTagName("input")[0]!;
       if (
         input.value === target.getAttribute("data-description") &&
         input.selectionStart === input.value.length &&