Skip to main content

Bug Tracker

Side navigation

#11814 closed bug (fixed)

Opened May 24, 2012 04:01PM UTC

Closed June 19, 2012 05:50AM UTC

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

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

This has been a known issue for a while, but I don't see a ticket specifically for this. We recently received this pull: 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.

Attachments (0)
Change History (7)

Changed May 24, 2012 04:02PM UTC by timmywil comment:1

component: unfiledselector
milestone: None1.8
owner: → timmywil
priority: undecidedhigh
status: newassigned

Changed May 24, 2012 05:59PM UTC by Igin comment:2

This issue exists from 1.4.3 to 1.7.2

Changed May 26, 2012 08:22PM UTC by timmywil comment:3

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.

Changed May 26, 2012 08:22PM UTC by timmywil comment:4

#10525 is a duplicate of this ticket.

Changed June 05, 2012 06:30PM UTC by timmywil comment:5

#11842 is a duplicate of this ticket.

Changed June 19, 2012 05:22AM UTC by timmywil comment:6

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(, comma seems to be the only acceptable division. Landing a fix now.

Changed June 19, 2012 05:50AM UTC by timmywil comment:7

resolution: → fixed
status: assignedclosed

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

Changeset: ccffddd89b5fd6ce9388d1db52361c59649b132a