Opened 8 years ago
Closed 7 years ago
#10499 closed bug (fixed)
:nth-child() inside :has() treated as if outside it
| Reported by: | BoltClock | Owned by: | timmywil |
|---|---|---|---|
| Priority: | low | Milestone: | 1.8 |
| Component: | selector | Version: | 1.6.4 |
| Keywords: | Cc: | ||
| Blocked by: | Blocking: |
Description
This selector statement:
$('E:has(F:nth-child(n))')
is treated as:
$('E:nth-child(n):has(F)')
for any n.
The equivalent statement using the .has() method works correctly, finding E with an nth child that is F:
$('E').has('F:nth-child(n)')
In-depth test case: http://jsfiddle.net/BoltClock/tbUdq
Tested on latest versions of all major browsers.
Also affects jQuery 1.7b2.
This closed ticket seems related: http://bugs.jquery.com/ticket/4169
Change History (6)
comment:1 Changed 8 years ago by
| Component: | unfiled → selector |
|---|---|
| Priority: | undecided → low |
| Status: | new → open |
comment:2 Changed 7 years ago by
| Milestone: | None → 1.next |
|---|---|
| Owner: | set to timmywil |
| Status: | open → assigned |
comment:3 Changed 7 years ago by
| Milestone: | 1.next → 1.8 |
|---|---|
| Resolution: | → fixed |
| Status: | assigned → closed |
comment:4 Changed 7 years ago by
| Resolution: | fixed |
|---|---|
| Status: | closed → reopened |
comment:5 Changed 7 years ago by
| Status: | reopened → assigned |
|---|
comment:6 Changed 7 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Sizzle: fix a small bug with combinator cache. Fixes #10499.
Changeset: 4039d3668decade6c7098f7f270c45dd54ff6a8c
Note: See
TracTickets for help on using
tickets.

This wasn't actually fixed, just changed. Fix incoming.