Bug Tracker

Opened 6 years ago

Closed 6 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 6 years ago by anonymous

BTW, 'tr:visible:gt(1)' also works as expected.

comment:2 Changed 6 years ago by gibson042

Owner: set to gibson042
Status: newassigned

Looks like a problem in Sizzle; I'll investigate.

comment:3 Changed 6 years ago by gibson042

comment:4 Changed 6 years ago by Richard Gibson

Resolution: fixed
Status: assignedclosed

Selector: Update Sizzle

Fixes #14657

Changeset: 9ac88dea494b0b79d1e1d1d26f8d9f5eb670cf62

Note: See TracTickets for help on using tickets.