aboutsummaryrefslogtreecommitdiffstats
path: root/src/selector/var/whitespace.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/var/whitespace.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/var/whitespace.js')
-rw-r--r--src/selector/var/whitespace.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/selector/var/whitespace.js b/src/selector/var/whitespace.js
new file mode 100644
index 000000000..dcac814c7
--- /dev/null
+++ b/src/selector/var/whitespace.js
@@ -0,0 +1,2 @@
+// https://www.w3.org/TR/css3-selectors/#whitespace
+export default "[\\x20\\t\\r\\n\\f]";