Bug Tracker

Opened 11 years ago

Closed 11 years ago

#11814 closed bug (fixed)

Sizzle's element-rooted QSA strategy (i.e. attaching a temporary id) does not account for comma and other other selector divisions

Reported by: Timmy Willison Owned by: Timmy Willison
Priority: high Milestone: 1.8
Component: selector Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:

Description

This has been a known issue for a while, but I don't see a ticket specifically for this. We recently received this pull: https://github.com/jquery/sizzle/pull/104. Unfortunately, the issue is more complicated than just accounting for commas for a couple reasons.

  • There are several other ways a selector can have multiple divisions. Comma is the most common, but several pseudo selectors and perhaps others can also have this effect.
  • escaped commas are valid in selectors.

I'm going to take a crack at this as well for 1.8.

Change History (7)

comment:1 Changed 11 years ago by Timmy Willison

Component: unfiledselector
Milestone: None1.8
Owner: set to Timmy Willison
Priority: undecidedhigh
Status: newassigned

comment:2 Changed 11 years ago by Igin

This issue exists from 1.4.3 to 1.7.2

comment:3 Changed 11 years ago by Timmy Willison

Woops, looks like I was the one who created a ticket on this matter and didn't see it. This ticket has a better description, but here is the test case from that ticket. http://jsfiddle.net/timmywil/tDgXy/

comment:4 Changed 11 years ago by Timmy Willison

#10525 is a duplicate of this ticket.

comment:5 Changed 11 years ago by Timmy Willison

#11842 is a duplicate of this ticket.

comment:6 Changed 11 years ago by Timmy Willison

I had the :not selector in mind when I was thinking of pseudos that create selector divisions, but it turns out :not only accepts simple selectors by spec (meaning no other divisions allowed). Having gone through this list(http://www.w3.org/TR/selectors/#selectors), comma seems to be the only acceptable division. Landing a fix now.

comment:7 Changed 11 years ago by Timmy Willison

Resolution: fixed
Status: assignedclosed

Update Sizzle: adds selector divisions for element-rooted QSA in the Dupont strategy. Fixes #11814.

Changeset: ccffddd89b5fd6ce9388d1db52361c59649b132a

Note: See TracTickets for help on using tickets.