diff --git a/src/htmx.js b/src/htmx.js index 824998754..3d4d6bc45 100644 --- a/src/htmx.js +++ b/src/htmx.js @@ -2430,7 +2430,7 @@ return (function () { } function shouldInclude(elt) { - if(elt.name === "" || elt.name == null || elt.disabled) { + if(elt.name === "" || elt.name == null || elt.disabled || closest(elt, "fieldset[disabled]")) { return false; } // ignore "submitter" types (see jQuery src/serialize.js) diff --git a/test/core/parameters.js b/test/core/parameters.js index fa6f62579..b395ac7de 100644 --- a/test/core/parameters.js +++ b/test/core/parameters.js @@ -239,5 +239,12 @@ describe("Core htmx Parameter Handling", function() { } }); + it('Input within disabled fieldset is excluded', function () { + var input = make('
'); + var vals = htmx._('getInputValues')(input, "get").values; + vals['foo'].should.equal('bar'); + should.equal(vals["do"], undefined); + }) + });