Skip to main content

Bug Tracker

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:

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.

Attachments (0)
Change History (4)

Changed December 29, 2013 09:25AM UTC by anonymous comment:1

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

Changed December 30, 2013 05:53PM UTC by gibson042 comment:2

owner: → gibson042
status: newassigned

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

Changed January 04, 2014 04:36PM UTC by gibson042 comment:3

Confirmed, and soon fixed: https://github.com/jquery/sizzle/pull/238

Changed January 13, 2014 02:41PM UTC by Richard Gibson comment:4

resolution: → fixed
status: assignedclosed

Selector: Update Sizzle

Fixes #14657

Changeset: 9ac88dea494b0b79d1e1d1d26f8d9f5eb670cf62