Skip to content

armgit / kanzo

Public Imported from GitHub
0

Self-hosted, sharable kanban for humans and agents. One 4.7 MB binary, 5 MB of RAM, 10 to 60 tokens per agent reply, starts in 3 ms, zero setup.

Close the task panel on a click outside it

emanuele-em62ae95e1f52b
diff --git a/src/app.js b/src/app.js
index 8e594c0..10048bb 100644
--- a/src/app.js
+++ b/src/app.js
@@ -336,6 +336,11 @@ function closeMenu() {
document.addEventListener("mousedown", (e) => {
if (!e.target.closest(".menu, .nav .more")) closeMenu();
});
+// A click outside the task panel closes it. Cards are left to open their own task,
+// and the project menu to do its job.
+document.addEventListener("mousedown", (e) => {
+ if (state.task && e.button === 0 && !e.target.closest("#panel, .card, .menu")) closeTask();
+});
window.addEventListener("resize", closeMenu);
window.addEventListener("blur", closeMenu);
$("#nav").addEventListener("scroll", closeMenu);