Bug Tracker

Opened 5 years ago

Closed 5 years ago

#9690 closed bug (cantfix)

nth-child + class does not work in Firefox 5

Reported by: Cardgage Owned by:
Priority: high Milestone: 1.next
Component: selector Version: 1.6.1
Keywords: Cc:
Blocked by: Blocking:


This selector is meant to select all the cells in the 8th column which have a class of "valueCell".

$("#dataTable tbody td:nth-child(8).valueCell")

Most browsers behave as expected, returning the cells that are in the 8th column and that have the specified class. In Firefox 5, however, it appears to be trying to select the 8th of those cells in the row which have the "valueCell" class. So if some of the cells do not have the class, they are not counted.

This works as expected in:

  • Safari 5.0.3
  • IE 9
  • Opera 11.11
  • Chrome 12.0.742.100.

It does not work as expected in:

  • Firefox 5.

I did not test Firefox 4.

Here is a working demo of the problem on jsFiddle: http://jsfiddle.net/5dDTP/

I was able to duplicate this problem on the following versions of jQuery:

  • 1.6.1
  • 1.6
  • 1.5.2
  • 1.4.4
  • 1.3.2

The expected behavior occurs in Firefox 5 when using jQuery version 1.2.6

Operating system: Windows 7

Change History (2)

comment:1 Changed 5 years ago by timmywil

  • Component changed from unfiled to selector
  • Priority changed from undecided to high
  • Status changed from new to open


comment:2 Changed 5 years ago by john

  • Resolution set to cantfix
  • Status changed from open to closed

Unfortunately this is something that we can't reasonably fix due to the way the browser works, we're optimistic that Firefox will fix this soon: http://docs.jquery.com/Won%27t_Fix

Note: See TracTickets for help on using tickets.