#3685 closed bug (fixed)
Selector fails for forms with an element named "name"
Reported by: | graymeat | Owned by: | |
---|---|---|---|
Priority: | blocker | Milestone: | 1.6 |
Component: | selector | Version: | 1.4.4 |
Keywords: | form expando | Cc: | Rick Waldron |
Blocked by: | Blocking: |
Description
Compare the results of the following two examples.
The first example displays an alert box with the name of the form. (Expected behavior.)
The second example displays an alert box with "undefined".
This is on Firefox 3.0.4.
<html> <head> <script src="javascript/jquery-1.2.6.js"></script> </head> <body> <a href="#">test</a> <form name="testform"> <input type="text" name="aname" value="" /> </form> <script> $("a").click(function() { var form = $("form[name=testform]"); alert(form.attr("name")); }); </script> </body> </html>
<html> <head> <script src="javascript/jquery-1.2.6.js"></script> </head> <body> <a href="#">test</a> <form name="testform"> <input type="text" name="name" value="" /> </form> <script> $("a").click(function() { var form = $("form[name=testform]"); alert(form.attr("name")); }); </script> </body> </html>
Change History (9)
comment:1 Changed 14 years ago by
Cc: | graymeat added |
---|---|
Component: | unfilled → core |
Status: | new → assigned |
comment:4 Changed 12 years ago by
Component: | core → manipulation |
---|---|
Keywords: | expando added |
Milestone: | 1.3 → 1.5 |
Owner: | flesler deleted |
Priority: | major → blocker |
Version: | 1.2.6 → 1.4.4 |
comment:5 Changed 12 years ago by
Cc: | graymeat removed |
---|---|
Component: | manipulation → selector |
Status: | assigned → open |
test case by rwaldorn from #7712
test case based on reporters code
comment:6 Changed 12 years ago by
Milestone: | 1.5 → 1.6 |
---|
This is getting moved to 1.6 for when the $.attr happens.
comment:7 Changed 12 years ago by
Cc: | Rick Waldron added |
---|
Note: See
TracTickets for help on using
tickets.
I'm not sure whether this is already fixed on trunk, I think we had a patch but added too much overhead.
I'll take a look asap.