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

onMenuClose doesn't trigger on mobile - closeMenuOnSelect is ignored #3893

Closed
Vadorequest opened this issue Jan 4, 2020 · 2 comments
Closed

Comments

@Vadorequest
Copy link

On mobile (Android 9), I'm experiencing two different issues.

  1. When I click on the react-select input, the keyboard is opened automatically (and sadly, can't do anything about it yet, see prevent keyboard from opening automaticaly #3526) and I have to close it to see the available choices.
  2. When I click on one of the choices, the menu gets closed (even though closeMenuOnSelect is false), and the onMenuClose isn't triggered either

This is particularly blocking when relying on onMenuClose to sync the selected choices with the state. In my case, I don't rely on the onChange event because I'm building a chatbot and I don't want to display the next message until the user is done selecting all its choices, therefore, I rely on onMenuClose event, but it doesn't perform well on mobile.

The only solution I can think of atm is to detect whether I'm running on mobile (great) and rely on onChange event when on mobile.

@elilambnz
Copy link

@Vadorequest does the recommended fix in #2771 solve your second issue?

@Vadorequest
Copy link
Author

There were actually two issues here:

  1. I found a workaround by disabling the search capability on mobile, so that the keyboard doesn't open, using isSearchable={!isMobileDevice()}
  2. Using blurInputOnSelect={false} did fix my issue as stated in closeMenuOnSelect=false doesn't work on mobile chrome #2771 , thanks!

I'll close this issue then.

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