#6428 closed bug (fixed)
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: | #6093 | 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
Change History (8)
comment:1 Changed 12 years ago by
need: | Review → Patch |
---|---|
Priority: | → low |
comment:2 Changed 12 years ago by
Blocked by: | 6093 added |
---|
comment:2 Changed 12 years ago by
Blocked by: | 6093 removed |
---|---|
Milestone: | 1.4.3 → 1.5 |
Priority: | low → high |
Status: | new → open |
Version: | 1.4.2 → 1.4.3 |
Caused by #6448.
comment:3 Changed 12 years ago by
Blocked by: | 6093 added |
---|
(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.
comment:6 Changed 12 years ago by
Owner: | set to 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.
comment:8 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Pull over tests from Sizzle. Fixes #3729. Fixes #6428.
Changeset: 1e4f3c07c70861fc334a0e61080f8bbde0d7d442
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.