From 093475f5b57744f2c1c9be82264945ce91736137 Mon Sep 17 00:00:00 2001 From: Benjamin-Re Date: Sun, 17 Apr 2022 14:51:43 +0200 Subject: [PATCH] Todo fix update function1 --- src/modules/controller.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/modules/controller.js b/src/modules/controller.js index 540f330..654e0e8 100644 --- a/src/modules/controller.js +++ b/src/modules/controller.js @@ -132,10 +132,12 @@ class Controller { this.popup.lastElementChild.style.display="none"; // Disable the trash can while editing icon.parentElement.nextElementSibling.firstChild.style.display="none"; + // Also disable other todos to be clicked // Add an update button (which will update not add a new one) const updateButton = document.createElement("button"); updateButton.textContent="update"; this.popup.appendChild(updateButton); + // Add event listener to the update button let todoTitle = this.todoInputField.value; let todoDate = this.todoDate.value; let todoPrio = this.todoPrio.value;