adding double-click edit for issues on web

This commit is contained in:
viljarb
2026-03-15 19:14:48 +01:00
parent e23d0155df
commit e03de80ceb
5 changed files with 37 additions and 36 deletions

View File

@@ -0,0 +1,19 @@
/**
* Open edit-issue modal when double-clicking a row in the issue list (list view).
* Uses event delegation and preventDefault so double-click doesn't select text.
*/
(function () {
document.addEventListener("dblclick", function (e) {
var row = e.target.closest("tr[data-issue-id]");
if (!row) return;
e.preventDefault();
var id = row.getAttribute("data-issue-id");
if (!id) return;
if (typeof htmx !== "undefined") {
htmx.ajax("GET", "/issues/" + id + "/edit", {
target: "#modal-container",
swap: "innerHTML",
});
}
});
})();