Side navigation
#6264 closed bug (duplicate)
Opened March 11, 2010 12:08PM UTC
Closed November 09, 2010 03:22AM UTC
Last modified November 09, 2010 03:22AM UTC
.submit() silently fails if the form has a <input name="submit">
Reported by: | gnarf | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | 1.4.3 |
Component: | event | Version: | 1.4.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
.submit() silently fails if the form has a <input name="submit"> or <input id="submit">
The event trigger function tries caling target[ type ] as a function without first checking to see if it is really a function.
On a form with <input type="submit" name="submit"> form.submit could be the submit button.
If it is, it might be smart to just trigger a "click" on it and hope for the best.
Attachments (0)
Change History (6)
Changed March 11, 2010 12:11PM UTC by comment:1
Changed March 11, 2010 04:38PM UTC by comment:2
This might be a better solution for when target[type] is not a function:
document.createElement(target.nodeName)[type].apply(target)
Changed March 18, 2010 12:47AM UTC by comment:3
This occurs for any element with the name of a form element property (length, action, method, etc.)
Changed April 28, 2010 07:41PM UTC by comment:4
subscribing for change notification
Changed November 09, 2010 03:22AM UTC by comment:5
priority: | → undecided |
---|---|
resolution: | → duplicate |
status: | new → closed |
subscribing for change notification