feat(tasks): allow only one editable section at one time

This commit is contained in:
Elian Doran 2025-02-25 17:46:17 +02:00
parent 06831ddc76
commit 84e8559401
No known key found for this signature in database

View File

@ -114,6 +114,11 @@ export default class TaskListWidget extends TypeWidget {
});
this.$taskContainer.on("click", "li", (e) => {
// Clear existing edit containers.
const $existingContainers = this.$taskContainer.find(".edit-container");
$existingContainers.html("");
// Add the new edit container.
const $target = $(e.target);
const $editContainer = $target.find(".edit-container");
$editContainer.html(buildEditContainer());