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