abort mit ui.abort ersetzt
This commit is contained in:
1 parent
6233d27d7b
commit
e715e66929
1 file changed
+6
-6
@@ -63,11 +63,11 @@ async function editItem(shoppingItem, id) {
|
||||
});
|
||||
|
||||
formElement.addEventListener("click", (e) => {
|
||||
if (e.target.matches(".editForm__buttonAbort")) abort();
|
||||
if (e.target.matches(".editForm__buttonAbort")) ui.abort(formElement, shoppingItem);
|
||||
})
|
||||
|
||||
formElement.addEventListener("keydown", (e) => {
|
||||
if (e.key == "Escape") abort();
|
||||
if (e.key == "Escape") ui.abort(formElement, shoppingItem);
|
||||
});
|
||||
|
||||
|
||||
@@ -112,13 +112,13 @@ function editCategory(categoryElement, id) {
|
||||
});
|
||||
|
||||
formElement.addEventListener("click", (e) => {
|
||||
if (e.target.matches(".editForm__buttonAbort")) abort();
|
||||
})
|
||||
if (e.target.matches(".editForm__buttonAbort")) ui.abort(formElement, categoryDiv);
|
||||
});
|
||||
|
||||
|
||||
formElement.addEventListener("keydown", (e) => {
|
||||
if (e.key == "Escape") abort();
|
||||
})
|
||||
if (e.key == "Escape") ui.abort(formElement, categoryDiv);
|
||||
});
|
||||
}
|
||||
|
||||
async function deleteItem(li) {
|
||||
|
||||
Reference in new issue
Block a user