Skip to main content

Bug Tracker

Side navigation

#4588 closed bug (duplicate)

Opened April 23, 2009 07:05PM UTC

Closed April 24, 2009 02:51AM UTC

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:
Description

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 (0.6 KB) - added by silfreed April 23, 2009 07:06PM UTC.

    Example html file where form is unselectable

Change History (1)

Changed April 24, 2009 02:51AM UTC by dmethvin comment:1

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.