Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix event delegation with selector-native #2048

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

Closed
timmywil opened this issue Jan 30, 2015 · 5 comments
Closed

Fix event delegation with selector-native #2048

timmywil opened this issue Jan 30, 2015 · 5 comments

Comments

@timmywil
Copy link
Member

When event delegation started using Sizzle's seed handling for scoped matches, it broke event delegation when selector-native replaced Sizzle. Worse comes to worse, we can just defer to matchesSelector and eat the scope issue.

@timmywil timmywil self-assigned this Jan 30, 2015
@timmywil timmywil added this to the 3.0.0 milestone Jan 30, 2015
@timmywil timmywil added the Bug label Jan 30, 2015
timmywil added a commit to timmywil/jquery that referenced this issue Nov 10, 2015
- Ignore certain tests that obviously are not supported

Fixes jquerygh-1742
Fixes jquerygh-2048
timmywil added a commit to timmywil/jquery that referenced this issue Nov 10, 2015
- Ignore certain tests that obviously are not supported
- Beefed up the sortOrder, uniqueSort, isXMLDoc, and attr functions

Fixes jquerygh-1742
Fixes jquerygh-2048
@timmywil
Copy link
Member Author

By the way, I was wrong about this being broken. I was thinking we weren't dealing with the seed argument in selector-native, but it turns out we were. There's still a behavior difference due to the nature of QSA's scoping problem, but that pretty much requires Sizzle to fix.

@mgol
Copy link
Member

mgol commented Nov 10, 2015

There's still a behavior difference due to the nature of QSA's scoping problem, but that pretty much requires Sizzle to fix.

...or the new @gibson042's in-jQuery implementation that borrows some ideas from Sizzle but only as much as needed (see jquery/sizzle#293 (comment) for more info). But that's a plan for the next major.

@dmethvin
Copy link
Member

At some point the DOM matches and findAll would help here, but nobody seems to be in a hurry to implement them.

@mgol
Copy link
Member

mgol commented Nov 10, 2015

Until we drop IE 11 (which will happen once we conquer Mars) we need all this parsing logic anyway.

@timmywil
Copy link
Member Author

...or the new @gibson042's in-jQuery implementation that borrows some ideas from Sizzle but only as much as needed (see jquery/sizzle#293 (comment) for more info). But that's a plan for the next major.

Or possibly later. Something I like about selector-native is that it doesn't even tokenize the selector, which would be required even in a streamlined engine. Rather than an in-jQuery implementation, I'd prefer to see a new version of Sizzle that drops all polyfills (for native selectors) and POS handling, and just manipulates the selector into something that can first go through qsa or matchesSelector, then filtered. Regardless, it won't be for 3.0, and it's something we can discuss later when the time comes.

@dmethvin dmethvin modified the milestones: 1.12/2.2, 3.0.0 Jan 7, 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.
Development

No branches or pull requests

3 participants