remove disabled attributes from anything disabled due to an htmx request when snapshotting for history

This commit is contained in:
Carson Gross
2024-08-01 12:59:42 -06:00
parent 116c8619d5
commit 115f2cf210

View File

@@ -3059,6 +3059,13 @@ var htmx = (function() {
forEach(findAll(clone, '.' + className), function(child) {
removeClassFromElement(child, className)
})
// remove the disabled attribute for any element disabled due to an htmx request
forEach(findAll(clone, '[disabled]'), function(child) {
const internalData = getInternalData(child)
if (internalData.requestCount > 0) {
child.removeAttribute('disabled');
}
})
return clone.innerHTML
}