const input = target.children[0] as HTMLInputElement;
if (
input.value === target.getAttribute("data-description") &&
- input.selectionStart === 0 &&
+ input.selectionStart === input.value.length &&
input.selectionEnd === input.value.length
) {
// No local changes have actually been made yet. Change the contents of the edit box!
input.value = newDescription;
- input.select();
} else {
// No great options.
// Prefer not to interrupt the local user's edit.
task.textContent = "";
task.appendChild(input);
input.focus();
- input.select();
event.preventDefault();
},