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

Focus on text input when typeahead is clicked #215

Open
rishadjb opened this issue Aug 18, 2016 · 5 comments
Open

Focus on text input when typeahead is clicked #215

rishadjb opened this issue Aug 18, 2016 · 5 comments

Comments

@rishadjb
Copy link

When I click in the area of the typeahead (or tokenizer when using it), it doesn't focus on the text input field automatically. I have to click the input field to focus on it.

There is a .focus function, but there is no onClick for the typeahead, which I link the .focus to.

Is there way to do this? Hopefully my explanation is clear enough in what I intend to do.

Thanks.

@larrydahooster
Copy link

mar-16-2017 10-37-16

I think I am having the same issue like @rishadjb described above.

@alexmassicott
Copy link

yes i have the same issue, i have to click multiple times

@Richard-Thompson
Copy link

was there any fix for this? @alexmassicott @larrydahooster ?

@alexmassicott
Copy link

@Richard-Thompson

I fixed it by changing the react-typeahead manually in the index.js,

I added on change to the onChange event, replace the index.js in the lib folder in the node_module

I can give you my whole node_module folder if you need it.
What causes the dropdown to trigger is this line in the typeahead index.js
this.setState({ isFocused: true, showResults: true });

index.js.zip

@fmoo
Copy link
Owner

fmoo commented Dec 15, 2017 via email

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