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

Form submits on enter key #10

Closed
nleo opened this issue Jul 24, 2015 · 3 comments
Closed

Form submits on enter key #10

nleo opened this issue Jul 24, 2015 · 3 comments
Assignees
Labels
Milestone

Comments

@nleo
Copy link

nleo commented Jul 24, 2015

Put 'll', select 'Hello' with arrows, press enter, input text replaced with 'Hello', but before it form send with 'll' to server

 if (keyCode == 13 && attr(result, "class").indexOf("open") != -1) {
    # Adding this dosn't help
    e.preventDefault();
    e.stopPropagation();
@nleo
Copy link
Author

nleo commented Jul 24, 2015

This helps

input.onkeydown = function(e) {
  if (e.keyCode == 13 && attr(result, "class").indexOf("open") != -1) {
    e.preventDefault();
    e.stopPropagation();
    return false;
  }
}                       

@baptistedonaux
Copy link
Contributor

Hi @nleo . It's true, It's really problematic. I work on the next version. I implement now this fix. Thank you for your feedback.

@baptistedonaux baptistedonaux self-assigned this Aug 12, 2015
@baptistedonaux baptistedonaux added this to the 2.0 milestone Aug 12, 2015
@baptistedonaux
Copy link
Contributor

Implemented in d7feb8a. Thank you for your feedback, code fix and encouragement.

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

No branches or pull requests

2 participants