Skip to content

[java] Fix submitting form containing input with name or id "submit" (#3398) - #3668

Closed
OndraM wants to merge 1 commit into
SeleniumHQ:masterfrom
OndraM:bugfix/form/submit
Closed

OndraM wants to merge 1 commit into
SeleniumHQ:masterfrom
OndraM:bugfix/form/submit

Conversation

@OndraM

@OndraM OndraM commented Mar 16, 2017 •

Copy link
Copy Markdown
Contributor

If form contains control with ID or NAME submit, it covers the form.submit() method, causing an error "form.submit is not a function".

This basically makes the submit() method on form element not working in this case.

See https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/submit.

The original prototype call could be used instead as a workaround. See https://trackjs.com/blog/when-form-submit-is-not-a-function/ .

@OndraM

OndraM commented Jun 9, 2017

Copy link
Copy Markdown
Contributor Author

Rebased with current master. Any chance getting this reviewed or merged? cc @barancev @shs96c

@p0deje p0deje added C-java Java Bindings Z-awaiting review Archived: use GitHub review assignments labels Jun 11, 2017
@OndraM

OndraM commented Aug 4, 2017

Copy link
Copy Markdown
Contributor Author

Came across the issue in a real world test once again. Is there anything more I can do to get this to upstream, please?

@p0deje

p0deje commented Aug 14, 2017

Copy link
Copy Markdown
Member

Really sorry it took so long.

In order to have this merged, we'll need a test reproducing the problem and passing with these changes. Can you write it?

@p0deje p0deje added Z-needs code changes Archived: use GitHub review features and removed Z-awaiting review Archived: use GitHub review assignments labels Aug 14, 2017
@barancev

Copy link
Copy Markdown
Member

Merged as 865c140. Thank you!

@barancev barancev closed this Sep 10, 2017
@OndraM

OndraM commented Sep 11, 2017

Copy link
Copy Markdown
Contributor Author

@barancev And thank you for adding the tests! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-java Java Bindings Z-needs code changes Archived: use GitHub review features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants