-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dispatch untrusted "submit" event in "submit" helper on the window instead of the form itself #6361
Comments
Also please note that all other browsers beside Firefox simply ignore this untrusted event, so there will be no change for those at all. |
As I noticed the extra event dispatching might happen because calling Once that is clear I will try to create some PRs for different bindings. |
Here the example code: https://codepen.io/anon/pen/BOZjWJ?editors=1010 |
As mentioned above removing the |
Note that the Java fix already landed as bbd0774. Further I cannot find such code for the node.js binding. As it looks like it only supports submitting the form directly? |
@barancev would you mind to backout the already landed changes for the Java, Python, and Ruby bindings? Thanks. |
It got all reverted: 946b7a2...df28b11 I'm going to close this as invalid. Sorry for the noise. |
…submission (SeleniumHQ#6373) This fixes the Ruby bindings for issue SeleniumHQ#6361.
…le submission (SeleniumHQ#6361)" This reverts commit 58e75ca.
The HTML spec says the following for untrusted events as created with
createEvent()
:Also the
submit
event is included here.Selenium creates and fires such an event for the
submit()
helper:https://github.com/SeleniumHQ/selenium/search?q=e.initEvent%28%27submit%27&unscoped_q=e.initEvent%28%27submit%27
From the point of submitting a form it is totally enough to just call:
Note that in Firefox this untrusted event is causing a double submission of the form data! This is about to get fixed, but relies on some external code (eg. Jenkins) to be updated first.
As long as this behavior stays in Selenium we are blocked with improving the WebDriver conformance in geckodriver / Marionette. See bug 1487705.
The text was updated successfully, but these errors were encountered: