X-Git-Url: http://git.scottworley.com/vopamoi/blobdiff_plain/90381b6d517d1a68e91c7049c04b476285c4f79d..a1aa43d897067989508bdf46e178cb27fc7464a1:/vopamoi.ts?ds=sidebyside diff --git a/vopamoi.ts b/vopamoi.ts index 3798488..3b0b470 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!; @@ -358,6 +359,7 @@ function BrowserUI() { taskFocusedBeforeJumpingToInput = document.activeElement; } document.getElementById("taskName")!.focus(); + window.scroll(0, 0); event.preventDefault(); },