Skip to content

Synthetic submit event should probably trigger form submission #4438

@upsuper

Description

@upsuper

It seems to me that currently dispatching a synthetic submit event to a form doesn't trigger submission of the form per spec, and dispatching submit event itself is a step in the form submit algorithm.

Gecko did submit when a synthetic submit event is dispatched to the form. When we tried to fix this difference in Gecko bug 1535988, we hit a compat issue that YUI 2 bases its behavior on browser detection. The condition is like

if ((UA.ie || UA.webkit) && bSubmitForm) {
  oForm.submit();
}

This basically means any browser which intends to conform to the spec but not pretends themselves as either IE or WebKit would hit this problem.

I suggest that we make synthetic submit event trigger form submission (when the event is not defaultPrevented), and block double submission of the same form (so that the extra submit() call wouldn't affect WebKit-based browsers).

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    compatStandard is not web compatible or proprietary feature needs standardizinginteropImplementations are not interoperable with each othertopic: eventstopic: forms

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions