diff --git a/frontend/src/TaskPanel.svelte b/frontend/src/TaskPanel.svelte
index de12775..c4e9782 100644
--- a/frontend/src/TaskPanel.svelte
+++ b/frontend/src/TaskPanel.svelte
@@ -8,7 +8,7 @@ import TaskDisplay from "./TaskDisplay.svelte";
let selectedTask: TaskDescriptor | null = null
export let selectedTaskId: string | null = null
- let heightClass: "collapsed" | "full" | "preview" = "collapsed"
+ let heightClass: "closed" | "collapsed" | "full" | "preview" = "collapsed"
export function preSelect(task: TaskDescriptor) {
if (heightClass != "full") {
@@ -36,13 +36,19 @@ import TaskDisplay from "./TaskDisplay.svelte";
function close() {
location.hash = ""
- heightClass = "collapsed"
+ heightClass = "closed"
window.setTimeout(() => window.scrollTo({
top: 0,
left: 0,
behavior: 'smooth'
}), 100)
}
+
+ function handleKeydown(e: KeyboardEvent) {
+ if (e.key === "Escape") {
+ close()
+ }
+ }
+