}
},
- destroyTask: function () {
- const createTimestamp = document.activeElement?.getAttribute("data-created");
- this.moveCursor(1) || this.moveCursor(-1);
- return UI.destroyTask(createTimestamp!);
+ firstVisibleTask: function () {
+ for (const task of document.getElementsByClassName("task")) {
+ if (task instanceof HTMLElement && task.style.display !== "none") {
+ return task;
+ }
+ }
},
focusTaskNameInput: function (event: Event) {
function browserInit() {
document.body.addEventListener("keydown", handleKey, { capture: false });
log.replay();
+ BrowserUI.firstVisibleTask()?.focus();
}