Skip to content
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

Make enter key submit forms selectively #110

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Make enter key submit forms selectively #110

wants to merge 1 commit into from

Conversation

justincorrigible
Copy link

As discussed a couple of years ago on issue #2, whenever pressing enter to select from the autocomplete list, the implicit submission mechanism kicks in and the form is submitted.

This change allows for safe selection, without killing the accessible behaviour.

blur = true;
inputBinding.locationNameInput.on("keypress", function(e){
if (!e.originalEvent) { return; }
if ((e.keyCode === 13 || e.keyCode == 9)){

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line doesn't need the extra indentation. :)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True. realigning.

As discussed a couple of years ago on issue #2, whenever pressing enter to select from the autocomplete list, the implicit submission mechanism kicks in, and the form is submitted.

This change allows for selection, without killing the accessible behaviour.
@ddinchev
Copy link

@franzliedke I want to bump this - I've been using a fork to have it.

@franzliedke
Copy link

@ddinchev I don't maintain this script.

@alex-bes or @lexaux would have to merge this. Or @corvis? :)

@ddinchev
Copy link

ddinchev commented Jan 29, 2017

@franzliedke I'm sorry - I just assumed this as you were a reviewer. I hope the package maintainers will take this PR into consideration :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants