Skip to content

[Help] Enter Key closes modal #1660

Discussion options

You must be logged in to vote

The Browsers impement their own logic when pressing the enter key inside a form and trigger the submit by themselves if there is at least one submit button. By default each <button> is a submit button.
Your keyboardShortcuts: false approach was quite right, however to also prevent the browsers default logic, use div buttons instead
See https://jsfiddle.net/lubber/hajkt2rb/13/

We had a similar question at #1632

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by lubber-de
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1660 on October 06, 2020 21:46.