From: Scott Worley Date: Sun, 30 Jan 2022 00:40:07 +0000 (-0800) Subject: Edit should still work when a tag has focus X-Git-Url: http://git.scottworley.com/vopamoi/commitdiff_plain/acd6b66a4b477803c65ffac202b44f5511d3f5d3?ds=sidebyside;hp=90381b6d517d1a68e91c7049c04b476285c4f79d Edit should still work when a tag has focus --- diff --git a/vopamoi.ts b/vopamoi.ts index 3798488..73fc5d9 100644 --- a/vopamoi.ts +++ b/vopamoi.ts @@ -287,8 +287,9 @@ function BrowserUI() { }, beginEdit: function (event: Event) { - const task = document.activeElement; + var task = document.activeElement; 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!;