Skip to content

Conversation

@mgol
Copy link
Member

@mgol mgol commented Oct 13, 2019

An optimization added in #431 skips the temporary IDs for selectors
not using child or descendant combinators. For sibling combinators, though, this
pushes a selector with a leading combinator to qSA directly which crashes and
falls back to a slower Sizzle route.

This commit makes selectors with leading combinators not skip the selector
rewriting. Note that after jquery/jquery#4454 & #453, all modern
browsers other than Edge leverage the :scope pseudo-class, avoiding temporary
id attributes.

Ref gh-431

jQuery PR (for jQuery 4.0): jquery/jquery#4509

An optimization added in jquery#431 skips the temporary IDs for selectors
not using child or descendant combinators. For sibling combinators, though, this
pushes a selector with a leading combinator to qSA directly which crashes and
falls back to a slower Sizzle route.

This commit makes selectors with leading combinators not skip the selector
rewriting. Note that after jquery/jquery#4454 & jquery#453, all modern
browsers other than Edge leverage the :scope pseudo-class, avoiding temporary
id attributes.

Ref jquerygh-431
@mgol mgol merged commit a528ae5 into jquery:master Oct 14, 2019
@mgol mgol deleted the leading-combinators branch October 14, 2019 16:26
@mgol mgol added this to the 2.3.5 milestone Feb 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants