]> git.scottworley.com Git - vopamoi/commitdiff
Edit should still work when a tag has focus
authorScott Worley <scottworley@scottworley.com>
Sun, 30 Jan 2022 00:40:07 +0000 (16:40 -0800)
committerScott Worley <scottworley@scottworley.com>
Sun, 30 Jan 2022 00:40:07 +0000 (16:40 -0800)
vopamoi.ts

index 3798488956531e1c9e9dd4d6112535d520d96de3..73fc5d90b5c81c0ea246dbcbfd163178abfe0bb3 100644 (file)
@@ -287,8 +287,9 @@ function BrowserUI() {
     },
 
     beginEdit: function (event: Event) {
     },
 
     beginEdit: function (event: Event) {
-      const task = document.activeElement;
+      var task = document.activeElement;
       if (!task) return;
       if (!task) return;
+      if (task.classList.contains("tag")) task = task.parentElement!;
       const input = document.createElement("input");
       const desc = task.getElementsByClassName("desc")[0];
       const oldDescription = desc.textContent!;
       const input = document.createElement("input");
       const desc = task.getElementsByClassName("desc")[0];
       const oldDescription = desc.textContent!;