Bug Tracker

Opened 14 years ago

Closed 14 years ago

#4588 closed bug (duplicate)

Form element with input element named "action" makes the form unselectable

Reported by: silfreed Owned by: john
Priority: major Milestone: 1.4
Component: selector Version: 1.3.2
Keywords: Cc:
Blocked by: Blocking:


In the attached example, I can't select the form through any method(jQuery('#mozdev-add-image-dialog').children('form'), jQuery('#mozdev-add-image-dialog').find('form'), jQuery('#mozdev-add-image-form'), jQuery('form')), and even trying to select the form's siblings or the form parent's children seems to fail (doesn't return - ex: jQuery('#mozdev-add-image-dialog').children()). If I change the input element inside the form named "action" to anything other than "action" the form becomes selectable.

Attachments (1)

form-unselectable.html (615 bytes) - added by silfreed 14 years ago.
Example html file where form is unselectable

Download all attachments as: .zip

Change History (2)

Changed 14 years ago by silfreed

Attachment: form-unselectable.html added

Example html file where form is unselectable

comment:1 Changed 14 years ago by dmethvin

Resolution: duplicate
Status: newclosed

Because of the way DOM1 properties of form elements work, it is not a good idea to give input elements any name that is also a property of the form (e.g., length, action, method, enctype, target). There are several long-standing tickets open about this including #3113 and #4039. I don't know if jQuery can easily fix this but in any case I'll close this ticket as a duplicate.

Note: See TracTickets for help on using tickets.