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: |
Description
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:
jQuery('input[type=hidden][name=ruleDto\\\\.operators\\\\[0\\\\]\\\\.operands\\\\[1\\\\]\\\\.descr]');
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 this.name === 'ruleDto.operators[0].operands[1].value'; });
I've placed sample code online:
http://www.ericmmartin.com/code/jquery/selector/
Possibly related to #5040
Attachments (0)
Change History (8)
Changed October 02, 2010 07:20PM UTC by comment:1
need: | Review → Patch |
---|---|
priority: | → low |
Changed October 21, 2010 12:36AM UTC by comment:2
blockedby: | → 6093 |
---|
Changed October 21, 2010 12:37AM UTC by comment:3
blockedby: | 6093 |
---|---|
milestone: | 1.4.3 → 1.5 |
priority: | low → high |
status: | new → open |
version: | 1.4.2 → 1.4.3 |
Caused by #6448.
Changed October 21, 2010 12:43AM UTC by 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 January 28, 2011 12:31AM UTC by comment:7
owner: | → jitter |
---|---|
status: | open → assigned |
version: | 1.4.3 → 1.5rc1 |
Still not fixed. Quoted/unquoted escaped attribute selectors fail in browser with no qSA if an element-rooted query is made.
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.