#9570 closed bug (fixed)
Selector $('form[name=".."]') returns zero elements in IE8 under some conditions
Reported by: | Trial | Owned by: | Timmy Willison |
---|---|---|---|
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>
Change History (6)
comment:1 Changed 12 years ago by
Component: | unfiled → selector |
---|---|
Keywords: | sizzle attributes added |
Milestone: | 1.next → 1.7 |
Priority: | undecided → low |
Status: | new → open |
comment:2 Changed 12 years ago by
Also it is risky to use attribute names that match other attribute/property names, like id, target, action, name, per DomLint:
comment:3 Changed 12 years ago by
Owner: | set to Timmy Willison |
---|---|
Status: | open → assigned |
comment:5 Changed 12 years ago by
@john: It is? I think this is a problem for all versions of jQuery. Correct me if I'm wrong.
comment:6 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note: See
TracTickets for help on using
tickets.
When sizzle uses jQuery's attr logic, this won't be a problem.