Bug Tracker

Modify

Ticket #4588 (closed bug: duplicate)

Opened 5 years ago

Last modified 5 years ago

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:
Blocking: Blocked by:

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

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

Change History

Changed 5 years ago by silfreed

Example html file where form is unselectable

comment:1 Changed 5 years ago by dmethvin

  • Status changed from new to closed
  • Resolution set to duplicate

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.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.