-
Notifications
You must be signed in to change notification settings - Fork 594
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
Enter submits form in Firefox #462
Comments
I am seeing the same thing. As a temporary work around I'm using this jQuery to disable all form submit with Enter $(document).on("keypress", ":input:not(textarea)", function(event) {
return event.keyCode != 13;
}); |
Thanks! Had to make some changes since I don't use jQuery, but it seems to work. |
Yeah this is a bug - will investigate 👍 |
This has been resolved in version 4.1.2. Thanks 👍 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm using a multiselect instance of Choices, within a
<form>
. When I select a choice by pressing Enter, Firefox will automatically try and submit the form.An example in a Codepen: https://codepen.io/drweissbrot/full/QJGqGj/
The console mentions
ReferenceError: event is not defined
in https://github.com/jshjohnson/Choices/blob/master/src/scripts/choices.js#L1258.Everything is working properly when clicking to select a choice.
This appears to only be a problem in Firefox, everything is working fine in Chrome. I'm using Choices 4.1.1 beta, the problem also persists in 4.1.0.
The text was updated successfully, but these errors were encountered: