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

Fix event delegation with selector-native #2048

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

Comments

Projects
None yet
3 participants
@timmywil
Member

timmywil commented Jan 30, 2015

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

Selector: pass jQuery unit tests with selector-native
- Ignore certain tests that obviously are not supported

Fixes gh-1742
Fixes gh-2048

timmywil added a commit to timmywil/jquery that referenced this issue Nov 10, 2015

Selector: pass jQuery unit tests with selector-native
- Ignore certain tests that obviously are not supported
- Beefed up the sortOrder, uniqueSort, isXMLDoc, and attr functions

Fixes gh-1742
Fixes gh-2048
@timmywil

This comment has been minimized.

Show comment
Hide comment
@timmywil

timmywil Nov 10, 2015

Member

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.

Member

timmywil commented Nov 10, 2015

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

This comment has been minimized.

Show comment
Hide comment
@mgol

mgol Nov 10, 2015

Member

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.

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

This comment has been minimized.

Show comment
Hide comment
@dmethvin

dmethvin Nov 10, 2015

Member

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

Member

dmethvin commented Nov 10, 2015

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

@mgol

This comment has been minimized.

Show comment
Hide comment
@mgol

mgol Nov 10, 2015

Member

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

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

This comment has been minimized.

Show comment
Hide comment
@timmywil

timmywil Nov 10, 2015

Member

...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.

Member

timmywil commented Nov 10, 2015

...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.

@timmywil timmywil closed this in 8804644 Nov 11, 2015

@dmethvin dmethvin modified the milestones: 1.12/2.2, 3.0.0 Jan 7, 2016

@cssmagic cssmagic referenced this issue May 18, 2016

Open

jQuery #5

@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.