Tripple negation and text nodes #2808

Closed
vanderlee opened this Issue Jan 11, 2016 · 1 comment

Projects

None yet

2 participants

@vanderlee
Contributor

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.

@vanderlee vanderlee added a commit to vanderlee/jquery that referenced this issue Jan 11, 2016
@vanderlee vanderlee Fix for #2808; inconsistent .not/.filter
Inconsistent ehaviour for non-element nodes when using multiple recursive pseudo-selectors on `*` in `.not()` and `.filter()`.
50635f1
@vanderlee vanderlee added a commit to vanderlee/jquery that referenced this issue Jan 11, 2016
@vanderlee vanderlee Fix for #2808; inconsistent .not/.filter
Inconsistent ehaviour for non-element nodes when using multiple recursive pseudo-selectors on `*` in `.not()` and `.filter()`.
640d2b1
@vanderlee vanderlee added a commit to vanderlee/jquery that referenced this issue Jan 12, 2016
@vanderlee vanderlee Testcases for #2808 876fe48
@timmywil timmywil pushed a commit that closed this issue Jan 13, 2016
@vanderlee vanderlee + Timmy Willison Traversing: .not/.filter consistency with non-elements
Fixes gh-2808
Close gh-2809
0e2f8f9
@timmywil timmywil closed this in 0e2f8f9 Jan 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment