Opened 9 years ago
Closed 9 years ago
#14657 closed bug (fixed)
chained :visible selector aborts after the first row on a table with a given context
Reported by: | rds12 | Owned by: | gibson042 |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.10.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
See this small test case: http://jsfiddle.net/QcG7Z/
This line does not work as expected, it only selects one row.
$('tr:gt(1):visible', table)
If you remove the context or remove the :gt(1) it works as expected.
If you first use
$('tr:gt(1)', table).filter(':visible')
it will also work as expected.
If you replace the <table> with <div> and <tr><td> with <span> it also works as expected, so this bug may only apply to tables.
This Bug could be reproduced in Firefox 26.0 and Chromium 31.0.1650.63 and is around since jquery 1.9, because until 1.8 it worked.
Maybe this is expected behavior and documented in the http://jquery.com/upgrade-guide/1.9/, but I couldn't find an entry for :visible.
Change History (4)
comment:1 Changed 9 years ago by
comment:2 Changed 9 years ago by
Owner: | set to gibson042 |
---|---|
Status: | new → assigned |
Looks like a problem in Sizzle; I'll investigate.
comment:3 Changed 9 years ago by
Confirmed, and soon fixed: https://github.com/jquery/sizzle/pull/238
comment:4 Changed 9 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
BTW, 'tr:visible:gt(1)' also works as expected.