mirror of
https://github.com/bigskysoftware/htmx.git
synced 2026-01-25 05:06:13 +00:00
remove disabled attributes from anything disabled due to an htmx request when snapshotting for history
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user