From cfab13f147ab56bcb52d7d39f4bc545af0c6081f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20B=C3=B6hm?= Date: Thu, 8 Apr 2021 14:17:16 -0700 Subject: [PATCH] refactor(forms): Use `:enabled` pseudo Instead of the equivalent `:not(:disabled)` --- lib/api/forms.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/api/forms.js b/lib/api/forms.js index 7f19330c49..f0bedc068e 100644 --- a/lib/api/forms.js +++ b/lib/api/forms.js @@ -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