mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-06-25 16:19:19 +02:00
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:
@@ -24,7 +24,7 @@ document.body.addEventListener('htmx:sendError', function (e) {
|
|||||||
});
|
});
|
||||||
document.body.addEventListener('htmx:beforeSend', function (e) {
|
document.body.addEventListener('htmx:beforeSend', function (e) {
|
||||||
if (e.target.id && (e.target.id.includes('fieldset-') || e.target.name)) {
|
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) {
|
document.body.addEventListener('htmx:afterSettle', function (e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user