summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
7b57440)
When the completeEdit is invoked by keystroke, we don't want it invoked
a second time as a result of its own action removing the input field.
Firefox does *not* call the "blur" event when a focused input element is removed.
Chromium *does* call the "blur" event when a focused input element is removed.
So this is needed for Chromium.
const task = input.parentElement!;
const oldDescription = task.getAttribute("data-description")!;
const newDescription = input.value;
const task = input.parentElement!;
const oldDescription = task.getAttribute("data-description")!;
const newDescription = input.value;
+ input.removeEventListener("blur", BrowserUI.completeEdit);
task.removeChild(task.children[0]);
task.removeAttribute("data-description");
task.focus();
task.removeChild(task.children[0]);
task.removeAttribute("data-description");
task.focus();