Ticket #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: | timmywil | Owned by: | timmywil |
|---|---|---|---|
| Priority: | high | Milestone: | 1.8 |
| Component: | selector | Version: | 1.7.2 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
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
comment:1 Changed 12 months ago by timmywil
- Owner set to timmywil
- Priority changed from undecided to high
- Status changed from new to assigned
- Component changed from unfiled to selector
- Milestone changed from None to 1.8
comment:3 Changed 12 months ago by timmywil
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:6 Changed 11 months ago by timmywil
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 months ago by timmywil
- Status changed from assigned to closed
- Resolution set to fixed
Update Sizzle: adds selector divisions for element-rooted QSA in the Dupont strategy. Fixes #11814.
Changeset: ccffddd89b5fd6ce9388d1db52361c59649b132a
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
