Skip to main content

Bug Tracker

Side navigation

#6428 closed bug (fixed)

Opened April 12, 2010 11:19PM UTC

Closed January 28, 2011 12:52AM UTC

Last modified March 14, 2012 01:39AM UTC

IE 6 & 7 selector bug when using complex selector

Reported by: emartin24 Owned by: jitter
Priority: high Milestone: 1.5
Component: selector Version: 1.5rc1
Keywords: ie7, ie6, selector Cc:
Blocked by: Blocking:

I have a form that uses array notation in the input element name attribute. I am able to select a particular element with the following:


If I add an ID selector to the beginning, it no longer works in IE6 or IE7:

  jQuery('#one input[type=hidden][name=ruleDto\\\\.operators\\\\[0\\\\]\\\\.operands\\\\[1\\\\]\\\\.value]');

In order to get the correct results, I am able to use the filter function:

  els = $$('#one input:hidden').filter(function (idx) {
    return === 'ruleDto.operators[0].operands[1].value';

I've placed sample code online:

Possibly related to #5040

Attachments (0)
Change History (8)

Changed October 02, 2010 07:20PM UTC by addyosmani comment:1

need: ReviewPatch
priority: → low

The provided test cases work as follows in IE based browsers:

IE 9: passes

IE 8: passes

IE 7: fails

IE 6: fails

As mentioned, a work-around is available for this type of behaviour and given that there are currently more critical bugs to be fixed in the core, I am flagging this for a low-priority patch.

Changed October 21, 2010 12:36AM UTC by snover comment:2

blockedby: → 6093

Changed October 21, 2010 12:37AM UTC by snover comment:3

blockedby: 6093
priority: lowhigh
status: newopen

Caused by #6448.

Changed October 21, 2010 12:43AM UTC by snover comment:4

blockedby: → 6093

(In #6093) test case with explanation:

First and third test cases should fail everywhere. qSA throws a SYNTAX_ERR because they are not valid, which causes Sizzle to pick them up and try again, and it matches because it is parsing the strings incorrectly.

Second and forth test cases should pass everywhere. IE6-7 do not have qSA support they go to Sizzle, and since Sizzle is parsing the strings wrong they fail in IE6-7.

Changed November 10, 2010 08:06PM UTC by snover comment:5

#7459 is a duplicate of this ticket.

Changed November 17, 2010 05:38AM UTC by snover comment:6

#3743 is a duplicate of this ticket.

Changed January 28, 2011 12:31AM UTC by jitter comment:7

owner: → jitter
status: openassigned

test case

Still not fixed. Quoted/unquoted escaped attribute selectors fail in browser with no qSA if an element-rooted query is made.

pull request

Changed January 28, 2011 12:52AM UTC by Anton M comment:8

resolution: → fixed
status: assignedclosed

Pull over tests from Sizzle. Fixes #3729. Fixes #6428.

Changeset: 1e4f3c07c70861fc334a0e61080f8bbde0d7d442