Skip to content

Commit

Permalink
refactor(forms): Use :enabled pseudo
Browse files Browse the repository at this point in the history
Instead of the equivalent `:not(:disabled)`
fb55 committed Apr 8, 2021
1 parent 78dacda commit cfab13f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/api/forms.js
Original file line number Diff line number Diff line change
@@ -48,8 +48,8 @@ exports.serializeArray = function () {
return $elem.filter(submittableSelector).toArray();
})
.filter(
// Verify elements have a name (`attr.name`) and are not disabled (`:disabled`)
'[name!=""]:not(:disabled)' +
// Verify elements have a name (`attr.name`) and are not disabled (`:enabled`)
'[name!=""]:enabled' +
// and cannot be clicked (`[type=submit]`) or are used in `x-www-form-urlencoded` (`[type=file]`)
':not(:submit, :button, :image, :reset, :file)' +
// and are either checked/don't have a checkable state

0 comments on commit cfab13f

Please sign in to comment.