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.children[0] as HTMLInputElement;
+ const input = target.firstChild as HTMLInputElement;
if (
input.value === target.getAttribute("data-description") &&
input.selectionStart === input.value.length &&
const oldDescription = task.getAttribute("data-description")!;
const newDescription = input.value;
input.removeEventListener("blur", this.completeEdit);
- task.removeChild(task.children[0]);
+ task.removeChild(input);
task.removeAttribute("data-description");
task.focus();
if (newDescription === oldDescription || resolution === CommitOrAbort.Abort) {