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

Comments

Projects
None yet
2 participants
@vanderlee
Contributor

vanderlee commented Jan 11, 2016

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

Fix for #2808; inconsistent .not/.filter
Inconsistent ehaviour for non-element nodes when using multiple recursive pseudo-selectors on `*` in `.not()` and `.filter()`.
@timmywil

This comment has been minimized.

Show comment
Hide comment
@timmywil
Member

timmywil commented Jan 11, 2016

vanderlee added a commit to vanderlee/jquery that referenced this issue Jan 11, 2016

Fix for #2808; inconsistent .not/.filter
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

@timmywil timmywil closed this in 0e2f8f9 Jan 13, 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.