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

Tab to select #164

wants to merge 8 commits into
base: master


2 participants

rickhanlonii commented May 5, 2016


Adds a setting tabToSelect to allow tabbing to select suggestion.

Closes #163


  • Adds property tabToSelect (defaults to false)
  • Sends Tab event type to onSuggestionsUpdateRequested and onSuggestionSelected
  • Updates README documentation with setting and event types for above functions
  • Adds tests for both true and false values of the setting

@rickhanlonii rickhanlonii force-pushed the rickhanlonii:tab-as-select branch from 4c9cea5 to 67ac04f May 5, 2016

@rickhanlonii rickhanlonii referenced this pull request May 5, 2016


Tab as select #1

case 'Tab': {
if (tabToSelect) {

This comment has been minimized.


rickhanlonii May 6, 2016


This may need to be moved inside the if below. Users may want to tab to another field when there's no focused suggestion.


This comment has been minimized.


moroshko commented May 7, 2016

@rickhanlonii Thanks a lot for a detailed PR!

I must admit that I'm a bit confused with the functionality you are trying to achieve. In #163 you mentioned "Slack user mentions". As far as I can see, pressing Tab in Slack is somewhat equivalent to pressing Down, not pressing Enter, i.e. it moves to the next suggestion rather than selecting the focused one. The URL bar in Chrome behaves the same. Am I missing something?


This comment has been minimized.


rickhanlonii commented May 8, 2016

Great point @moroshko, I'll update and re-open.

@@ -54,6 +54,18 @@ export const onSuggestionsUpdateRequested = sinon.spy(({ value }) => {
export const tabToSelect = {

This comment has been minimized.


rickhanlonii May 8, 2016


Note: also going to update this API per the comments here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment