Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tripple negation and text nodes #2808

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

Tripple negation and text nodes #2808

vanderlee opened this issue Jan 11, 2016 · 1 comment

Comments

@vanderlee
Copy link
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 added a commit to vanderlee/jquery that referenced this issue Jan 11, 2016
Inconsistent ehaviour for non-element nodes when using multiple recursive pseudo-selectors on `*` in `.not()` and `.filter()`.
@timmywil
Copy link
Member

Fiddle: https://jsfiddle.net/m62syb56/

vanderlee added a commit to vanderlee/jquery that referenced this issue Jan 11, 2016
Inconsistent ehaviour for non-element nodes when using multiple recursive pseudo-selectors on `*` in `.not()` and `.filter()`.
vanderlee added a commit to vanderlee/jquery that referenced this issue Jan 12, 2016
@lock lock bot locked as resolved and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants