Side navigation
#9570 closed bug (fixed)
Opened June 13, 2011 07:31AM UTC
Closed September 19, 2011 07:43PM UTC
Last modified March 08, 2012 11:22PM UTC
Selector $('form[name=".."]') returns zero elements in IE8 under some conditions
Reported by: | Trial | Owned by: | timmywil |
---|---|---|---|
Priority: | low | Milestone: | 1.7 |
Component: | selector | Version: | 1.6.1 |
Keywords: | sizzle attributes | Cc: | |
Blocked by: | Blocking: |
Description
Selector $('form[name=".."]') returns zero elements in IE8 if form has <input name="name">
<form name="form1">
<input type="text" name="name">
</form>
<script>
alert($('form[name="form1"]').length); // 0 in IE8, 1 in Mozilla
</script>
Attachments (0)
Change History (6)
Changed June 13, 2011 02:08PM UTC by comment:1
component: | unfiled → selector |
---|---|
keywords: | → sizzle attributes |
milestone: | 1.next → 1.7 |
priority: | undecided → low |
status: | new → open |
Changed June 13, 2011 08:54PM UTC by comment:2
Also it is risky to use attribute names that match other attribute/property names, like id, target, action, name, per DomLint:
Changed August 15, 2011 04:07PM UTC by comment:3
owner: | → timmywil |
---|---|
status: | open → assigned |
Changed September 11, 2011 10:25PM UTC by comment:5
@john:
It is? I think this is a problem for all versions of jQuery. Correct me if I'm wrong.
When sizzle uses jQuery's attr logic, this won't be a problem.