Side navigation
#14657 closed bug (fixed)
Opened December 28, 2013 01:46PM UTC
Closed January 13, 2014 02:41PM UTC
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:
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.
Attachments (0)
Change History (4)
Changed December 29, 2013 09:25AM UTC by comment:1
Changed December 30, 2013 05:53PM UTC by comment:2
owner: | → gibson042 |
---|---|
status: | new → assigned |
Looks like a problem in Sizzle; I'll investigate.
Changed January 04, 2014 04:36PM UTC by comment:3
Confirmed, and soon fixed: https://github.com/jquery/sizzle/pull/238
BTW, 'tr:visible:gt(1)' also works as expected.