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

Preventing default up/down key behavior even when no suggestions are available. #517

Closed
ShibumiGrant opened this issue Feb 28, 2018 · 5 comments

Comments

@ShibumiGrant
Copy link

Default behavior for pressing the up and down keys is being preventDefault'ed, even in cases where the autosuggest does not need to be using special handling for them. In input elements, this manifests as not being able to quickly jump to the beginning and end of an input using these keys, and in textarea and contenteditable elements it prevents jumping between lines.

Single-line Input Reproduction Steps: (Use the Basic example)

  1. Focus the input field.
  2. Type asdf.
  3. Make sure there are no suggestions available.
  4. Press up.

Observed Behavior: The cursor does not move.

Expected Behavior: The cursor moves to be in front of the first character in the input.

Multi-line Input Reproduction Steps: (Use this codepen)

  1. Focus the input field.
  2. Type asdf.
  3. Press enter to create a new line.
  4. Type asdf again.
  5. Make sure there are no suggestions available.
  6. Press up.

Observed Behavior: The cursor does not move.

Expected Behavior: The cursor moves to the line above.

@moroshko
Copy link
Owner

Sounds reasonable. Would you like to contribute a PR?

@ShibumiGrant
Copy link
Author

Gladly! Let me know if any changes should be made.
Any idea when the next release will be?

@cozmy
Copy link

cozmy commented Sep 2, 2019

@moroshko, do you know when you'd have time to merge @ShibumiGrant's changes? I also have the same issue and the proposed changes work.

@MUmer01
Copy link

MUmer01 commented Apr 17, 2020

Is the any progress in Preventing default up/down key behavior?

@pimterry
Copy link
Collaborator

This is now resolved by #768

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

No branches or pull requests

5 participants