Side navigation
#3685 closed bug (fixed)
Opened December 05, 2008 12:33AM UTC
Closed April 10, 2011 07:58PM UTC
Last modified March 09, 2012 08:30AM UTC
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: | rwaldron |
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>
Attachments (0)
Change History (9)
Changed December 06, 2008 12:17AM UTC by comment:1
cc: | → graymeat |
---|---|
component: | unfilled → core |
status: | new → assigned |
Changed December 06, 2010 03:54PM UTC by comment:4
component: | core → manipulation |
---|---|
keywords: | form → form expando |
milestone: | 1.3 → 1.5 |
owner: | flesler |
priority: | major → blocker |
version: | 1.2.6 → 1.4.4 |
Changed December 14, 2010 05:16PM UTC by comment:5
Changed January 17, 2011 04:54PM UTC by comment:6
milestone: | 1.5 → 1.6 |
---|
This is getting moved to 1.6 for when the $.attr happens.
Changed March 21, 2011 03:40PM UTC by comment:7
cc: | → rwaldron |
---|
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.