aboutsummaryrefslogtreecommitdiffstats
path: root/src/selector.js
diff options
context:
space:
mode:
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2019-11-18 22:10:55 +0100
committerGitHub <noreply@github.com>2019-11-18 22:10:55 +0100
commit05184cc448f4ed7715ddd6a5d724e167882415f1 (patch)
treec1b240fa57e4b0824ea04f9a1fd951722c1ce83c /src/selector.js
parentd0ce00cdfa680f1f0c38460bc51ea14079ae8b07 (diff)
downloadjquery-05184cc448f4ed7715ddd6a5d724e167882415f1.tar.gz
jquery-05184cc448f4ed7715ddd6a5d724e167882415f1.zip
Selector: Make empty attribute selectors work in IE again
qSA in IE 11/Edge often (but not always) don't find elements with an empty name attribute selector (`[name=""]`). Detect that & fall back to Sizzle traversal. Interestingly, IE 10 & older don't seem to have the issue. Fixes gh-4435 Closes gh-4510
Diffstat (limited to 'src/selector.js')
-rw-r--r--src/selector.js4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/selector.js b/src/selector.js
index 019f25d62..66abe7935 100644
--- a/src/selector.js
+++ b/src/selector.js
@@ -5,6 +5,7 @@ import documentElement from "./var/documentElement.js";
import indexOf from "./var/indexOf.js";
import pop from "./var/pop.js";
import push from "./var/push.js";
+import whitespace from "./selector/var/whitespace.js";
import rbuggyQSA from "./selector/rbuggyQSA.js";
import support from "./selector/support.js";
@@ -41,9 +42,6 @@ var i,
// Regular expressions
- // https://www.w3.org/TR/css3-selectors/#whitespace
- whitespace = "[\\x20\\t\\r\\n\\f]",
-
// https://www.w3.org/TR/css-syntax-3/#ident-token-diagram
identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace +
"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",