},
addTask: function (description: string) {
- document.body.appendChild(this.createTask(description));
+ document.body.appendChild(this.createTask(description)).focus();
},
moveCursor: function (offset: number) {
if (event.target.tagName !== "INPUT") {
if (event.key == "j") Model.moveCursor(1);
if (event.key == "k") Model.moveCursor(-1);
+ if (event.key == "c") {
+ document.getElementById("taskName")!.focus();
+ event.preventDefault();
+ }
}
}