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

https://github.com/corejavascript/typeahead.js/issues/33 #34

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

Conversation

aholland
Copy link

@aholland aholland commented Nov 4, 2015

For my purposes this change fixes the issue. Although I have changed 3 files, it is the same change in all three places.

I honestly do not have a full understanding of the surrounding code, so this is very much a change that should be reviewed. But for my project, this works much better. The undesired behaviour is described in the bug description ( #33 ) and the new behaviour is that
(a) when the whole exact string is typed in (e.g. a 4 digit invoice number in the case of my application) and then tab is pressed, the autocomplete event will now be fired and hence the bound function will be called with the correct, associated data from bloodhound.
(b) when less than the whole string is typed in (e.g. 3 digits of an invoice number) and then tab is pressed, the autocomplete event will complete the selection as before, but will also move focus out of the component and close the menu. This is as I want it.

@aholland
Copy link
Author

aholland commented Nov 4, 2015

Test failure noted but I still prefer the new behaviour. Please advise re null data.obj (as mentioned in failing test).

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.

1 participant