-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Description
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?