From 131c9fd6b3726381ec4b4d4c17d139f89ef6e039 Mon Sep 17 00:00:00 2001 From: Arthur Belleville Date: Fri, 15 May 2026 10:01:34 +0200 Subject: [PATCH] =?UTF-8?q?fix(04):=20draggable:.task-card-zone=20?= =?UTF-8?q?=E2=80=94=20move=20wrapper=20not=20inner=20card?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sortable.js draggable must match direct children of .sortable-column. Using .task-card (grandchild) caused Sortable to detach it from its .task-card-zone wrapper, breaking HTMX OOB swap targets and making drag appear to do nothing. Changed to .task-card-zone so the full wrapper moves, keeping id= attributes intact for HTMX round-trips. Also removed redundant form.dispatchEvent() before htmx.trigger() which could cause a double submit on reorder. Co-Authored-By: Claude Sonnet 4.6 (1M context) --- backend/templates/tasks.templ | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backend/templates/tasks.templ b/backend/templates/tasks.templ index 5297a10..158ad5e 100644 --- a/backend/templates/tasks.templ +++ b/backend/templates/tasks.templ @@ -51,7 +51,7 @@ templ KanbanBoard(tabloID uuid.UUID, csrfToken string, tasks []sqlc.Task) { group: "kanban", animation: 150, handle: ".task-drag-handle", - draggable: ".task-card", + draggable: ".task-card-zone", ghostClass: "bg-slate-100", chosenClass: "opacity-50", onEnd: function() { @@ -67,7 +67,6 @@ templ KanbanBoard(tabloID uuid.UUID, csrfToken string, tasks []sqlc.Task) { form.appendChild(colInp); }); }); - form.dispatchEvent(new Event("submit", { bubbles: true })); htmx.trigger(form, "submit"); } });