diff --git a/backend/static/ui.js b/backend/static/ui.js index fd03872..2e4471e 100644 --- a/backend/static/ui.js +++ b/backend/static/ui.js @@ -37,6 +37,12 @@ function el(tag, attrs = {}, children = []) { for (const [k, v] of Object.entries(attrs)) { if (k === "class") node.className = v; else if (k === "text") node.textContent = v; + else if (k.startsWith("on") && typeof v === "function") { + // Event handlers MUST be assigned as properties: setAttribute(k, fn) + // stringifies the function ("... => ...") and never binds a listener, + // which silently killed the Bearbeiten/Löschen buttons. + node[k] = v; + } else node.setAttribute(k, v); } for (const child of children) node.appendChild(child);