fix(04): draggable:.task-card-zone — move wrapper not inner card
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) <noreply@anthropic.com>
This commit is contained in:
parent
68f2ccdea3
commit
131c9fd6b3
1 changed files with 1 additions and 2 deletions
|
|
@ -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");
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue