diff --git a/frontend/src/lib/components/layout/TaskDrawer.svelte b/frontend/src/lib/components/layout/TaskDrawer.svelte
index ec0b243..776b5b6 100644
--- a/frontend/src/lib/components/layout/TaskDrawer.svelte
+++ b/frontend/src/lib/components/layout/TaskDrawer.svelte
@@ -64,9 +64,9 @@
window.location.href = "/reports";
}
- // Handle overlay click
- function handleOverlayClick(event) {
- if (event.target === event.currentTarget) {
+ function handleGlobalKeydown(event) {
+ if (!isOpen) return;
+ if (event.key === "Escape") {
handleClose();
}
}
@@ -192,25 +192,16 @@
});
-
+