Skip to content

Commit

Permalink
[java] Dispatch form "submit" event on window to prevent a form doubl…
Browse files Browse the repository at this point in the history
…e submission
  • Loading branch information
barancev committed Sep 6, 2018
1 parent 1407346 commit bbd0774
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -365,7 +365,7 @@ public W3CHttpCommandCodec() {
"if (!form.ownerDocument) { throw Error('Unable to find owning document'); }\n" +
"var e = form.ownerDocument.createEvent('Event');\n" +
"e.initEvent('submit', true, true);\n" +
"if (form.dispatchEvent(e)) { HTMLFormElement.prototype.submit.call(form) }\n",
"if (form.ownerDocument.dispatchEvent(e)) { HTMLFormElement.prototype.submit.call(form) }\n",
asElement(parameters.get("id")));

default:
Expand Down

0 comments on commit bbd0774

Please sign in to comment.