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

Item selection seems to be broken sometimes #60

Closed
janmyler opened this issue Nov 9, 2015 · 1 comment
Closed

Item selection seems to be broken sometimes #60

janmyler opened this issue Nov 9, 2015 · 1 comment

Comments

@janmyler
Copy link

janmyler commented Nov 9, 2015

We had a bug reported of a user not being able to select an item from the suggestions.

I traced the problem to GeosuggestItem.onClick and Geosuggest.hideSuggests functions. There's a 100ms timeout before the state in Geosuggest component changes to hide the suggestions. If user clicks on a GeosuggestItem, the hideSuggests function is executed at the same time (on blur). If user doesn't release the mouse button to actually trigger a click event, the list of suggestions is gone and nothing has been selected.

What would be the most correct solution to this problem? Increasing the timeout interval in hideSuggests or simply using onMouseDown event in the GeosuggestItem instead?

@ro-ka
Copy link
Contributor

ro-ka commented Nov 19, 2015

I think mousedown could be solution, but then a user cannot “abort” a select by moving the clicked mouse away. Any ideas?

mponizil added a commit to mponizil/react-geosuggest that referenced this issue Jan 29, 2016
@ro-ka ro-ka closed this as completed in 4fa6bd2 Feb 5, 2016
ro-ka added a commit that referenced this issue Feb 5, 2016
Fix #60 - use ignoreBlur flag to avoid hiding suggests when clicking one
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

2 participants