X-Git-Url: http://git.scottworley.com/vopamoi/blobdiff_plain/84849dfaf119d5b7aae614fcae323ee78461d84f..8e0dd97e0d4b07448bb1bde4f109e5192df1aa77:/vopamoi.ts diff --git a/vopamoi.ts b/vopamoi.ts index ad7a93e..33e37a3 100644 --- a/vopamoi.ts +++ b/vopamoi.ts @@ -67,7 +67,7 @@ const Model = { return tag; } } - task.appendChild(tag); + task.insertBefore(tag, task.getElementsByClassName("desc")[0]!); return tag; }, @@ -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 &&