diff options
author | Carson Gross <carson@bigsky.software> | 2024-08-01 12:59:42 -0600 |
---|---|---|
committer | Carson Gross <carson@bigsky.software> | 2024-08-01 12:59:42 -0600 |
commit | 115f2cf2108087802ee266b85ffa9987c929f84c (patch) | |
tree | 8be0a97f0010971ffd8583e4821099f32328520c | |
parent | 116c8619d5e6301e8df71f0d3caf32e8660b9096 (diff) | |
download | htmx-115f2cf2108087802ee266b85ffa9987c929f84c.tar.gz htmx-115f2cf2108087802ee266b85ffa9987c929f84c.zip |
remove `disabled` attributes from anything disabled due to an htmx request when snapshotting for history
-rw-r--r-- | src/htmx.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/htmx.js b/src/htmx.js index 592126e9..bae509b8 100644 --- a/src/htmx.js +++ b/src/htmx.js @@ -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 } |