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

Optionally propagate keydown events #140

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

clalimarmo
Copy link

so that we can leverage default keydown behaviors provided by the
browser, such as tabbing to the next input.

The default behavior is the previous behavior, so that this is not a
breaking change.

so that we can leverage default keydown behaviors provided by the
browser, such as tabbing to the next input.

The default behavior was the previous behavior, so that this is not a
breaking change.
@clalimarmo
Copy link
Author

This addresses feedback on #111, and provides a way to address issue #110

@stovmascript
Copy link

The prop should also be added to tokenizer's render method.

Althought it doesn't work very well with the tokenizer. When you search and press tab, a list item gets selected and focus immediately jumps to the next HTML element. In the case of the tokenizer, I think the focus should remain in the search input after selecting a list item and should jump to the next HTML element after pressing tab again, if the input is empty.

To make this useful for the tokenizer, we also take steps to keep the
focus on the tokenizer input, unless the input is empty.

We reuse the logic that determines whether "backspace" should clear a
token, or do it's default behavior.
@clalimarmo
Copy link
Author

I just guessed at what might work for the tokenizer. I haven't been using the Tokenizer at all, and don't have anything set up to actually test that change out. I'll eventually get around to it, but if you happen to try it out, let me know if it works :)

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.

2 participants