fix: remove leftover debug console.log that crashed HTMX with new FormData(fieldset)

The htmx:beforeSend listener in admin/footer.php was a debugging
leftover that called new FormData(e.target.closest('fieldset')).
FormData only accepts HTMLFormElement or nothing — passing a
<fieldset> throws 'Argument 1 does not implement interface
HTMLFormElement'.  Removed the serialization call; kept the
minimal debug log.
This commit is contained in:
Pontoporeia
2026-06-15 16:27:00 +02:00
parent 2633cb13b5
commit c8af3bf869

View File

@@ -24,7 +24,7 @@ document.body.addEventListener('htmx:sendError', function (e) {
});
document.body.addEventListener('htmx:beforeSend', function (e) {
if (e.target.id && (e.target.id.includes('fieldset-') || e.target.name)) {
console.log('[htmx:beforeSend] name=' + e.target.name + ' checked=' + e.target.checked, 'formData keys:', Array.from(new FormData(e.target.closest('fieldset'))).map(function(kv){return kv[0]}));
console.log('[htmx:beforeSend] name=' + e.target.name + ' checked=' + e.target.checked);
}
});
document.body.addEventListener('htmx:afterSettle', function (e) {