Tripple negation and text nodes #2808
This was referenced Jan 11, 2016
|
Fiddle: https://jsfiddle.net/m62syb56/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A while back, A.Wolff found an inconsistency in jQuery and posted it on StackOverflow.
I thought A.Wolff would submit this issue, but I can't find he did, so here it is:
http://stackoverflow.com/questions/34593399/triple-negation-needed-to-retrieve-text-node/34598245
In short; non-element (e.g. text) nodes in recursive
:not(*)(and probably other) pseudo-selectors are treated differently for.filter()and.not().I dug into the issue and found the cause. I'm not sure whether to consider this a bug or not, but there is an easy fix (in the answer) to make it atleast consistent. The cost of the fix is quite low.