Skip to main content

Bug Tracker

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 pbowyer comment:1

subscribing for change notification

Changed March 11, 2010 04:38PM UTC by gnarf 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 dmethvin comment:3

This occurs for any element with the name of a form element property (length, action, method, etc.)

http://yura.thinkweb2.com/domlint/

Changed April 28, 2010 07:41PM UTC by etiger13 comment:4

subscribing for change notification

Changed November 09, 2010 03:22AM UTC by snover comment:5

priority: → undecided
resolution: → duplicate
status: newclosed

Changed November 09, 2010 03:22AM UTC by snover comment:6

Duplicate of #1414.