Modify ↓
Ticket #9570 (closed bug: fixed)
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: | |
| Blocking: | Blocked by: |
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
comment:1 Changed 2 years ago by timmywil
- Keywords sizzle attributes added
- Priority changed from undecided to low
- Status changed from new to open
- Component changed from unfiled to selector
- Milestone changed from 1.next to 1.7
comment:2 Changed 2 years ago by dmethvin
Also it is risky to use attribute names that match other attribute/property names, like id, target, action, name, per DomLint:
comment:5 Changed 22 months ago by timmywil
@john: It is? I think this is a problem for all versions of jQuery. Correct me if I'm wrong.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

When sizzle uses jQuery's attr logic, this won't be a problem.