提交 79b624f2 编写于 作者: T Thomas de Grenier de Latour 提交者: Oleg Nenashev

[JENKINS-58296] Revert "[JENKINS-53462] Submit form on Firefox as well" (#4246)

* [JENKINS-58296] Revert "[JENKINS-53462] Submit form on Firefox as well"

This reverts commit acc4eec6.
This change had been made in Jenkins to anticipate Firefox not dispatching
untrusted submit events anymore in v69, but this has actually been backed out.

See https://bugzilla.mozilla.org/show_bug.cgi?id=1370630

Since this change seems to have introduced a double-submission bug on forms
with inputs of type "file", reverting sounds like the next logical step.

* [JENKINS-58296] added comment about the Firefox case
上级 619c2e3b
......@@ -2717,9 +2717,18 @@ version: 2.9.0
WILL cause the form's "submit" event to fire, but WILL NOT
submit the form. Therefore, we need to call the "submit"
method as well.
In Firefox, dispatching a "submit" event still submits the form,
so there is no need to call the "submit" method.
This might change in the future though:
https://bugzilla.mozilla.org/show_bug.cgi?id=1370630
In the mean time, we should not make a redundant call to "submit",
because it leads to the form being submitted twice in some cases:
https://issues.jenkins-ci.org/browse/JENKINS-58296
TODO: once we know the exact Firefox version which will change this
behavior, we should add a "UA.gecko >= XX" condition and call "submit".
*/
if ((UA.ie || UA.webkit || UA.gecko) && bSubmitForm) {
if ((UA.ie || UA.webkit) && bSubmitForm) {
oForm.submit();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册