-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(EntityModal): prevent Enter from submitting the form in Modal win…
…dow (#1047) ## The problem Enter for a form with single input triggers the form submission. [The specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#implicit-submission). The form submission was not properly handled. ## The fix - hook up on form submission by adding callback onSubmit for `<form />` element - prevent default behavior (sending GET with formdata in params and redirect) and proceed with our handlers (validation and sending as JSON with AJAX) ## References - https://splunk.atlassian.net/browse/ADDON-61126 - https://splunk.atlassian.net/browse/ADDON-58706 Resolves #875
- Loading branch information
1 parent
04b847f
commit b7f179a
Showing
4 changed files
with
19 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters