From 4a032000ae85b83149dfea03e9b645a2aec18b2b Mon Sep 17 00:00:00 2001 From: Tim Aldinger Date: Tue, 29 Sep 2026 13:17:59 +0200 Subject: [PATCH] =?UTF-8?q?Bearbeiten=20des=20Items=20durch=20dr=C3=BCcken?= =?UTF-8?q?=20auf=20Text?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ShoppingListItem.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/ShoppingListItem.js b/src/ShoppingListItem.js index 2d25724..367bb77 100644 --- a/src/ShoppingListItem.js +++ b/src/ShoppingListItem.js @@ -72,7 +72,6 @@ export class ShoppingListItem { const li = document.createElement("li"); const listContent = document.createElement("span"); const removeButton = document.createElement("button"); - const editButton = document.createElement("button"); const doneButton = document.createElement("input"); doneButton.setAttribute("type", "checkbox"); @@ -80,8 +79,7 @@ export class ShoppingListItem { this.isDone = doneButton.checked; }); - editButton.textContent = "Bearbeiten" - editButton.addEventListener("click", () => { + listContent.addEventListener("click", () => { this.isEditing = true; this.onChange(); }); @@ -96,7 +94,6 @@ export class ShoppingListItem { li.appendChild(doneButton); li.appendChild(listContent); - li.appendChild(editButton); li.appendChild(removeButton); return li;