]> git.scottworley.com Git - vopamoi/blobdiff - vopamoi.ts
Leave something focused after destroying a task
[vopamoi] / vopamoi.ts
index 56c4813923e46b600d6ab561f6bdb36b16fa0b7d..151c5e06103d8e8f68791350c0361c56fe5f9fdf 100644 (file)
@@ -96,7 +96,8 @@ const BrowserUI = {
 
   destroyTask: function () {
     const createTimestamp = document.activeElement?.getAttribute("data-created");
-    return createTimestamp && UI.destroyTask(createTimestamp);
+    this.moveCursor(1) || this.moveCursor(-1);
+    return UI.destroyTask(createTimestamp!);
   },
 
   focusTaskNameInput: function (event: any) {