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

If Combobox openOnFocus is true then also open when the input is clicked. #757

Merged
merged 2 commits into from
Apr 20, 2021

Conversation

ProggerPete
Copy link
Contributor

I was surprised to discover that clicking on the input doesn't automatically open the ComboboxList. This means that there is no way to make a selection using the mouse alone.

openOnFocus is enough for the 1st click, but after selecting a value the input retains focus, so the only way to open it again without using the keyboard is to click away and click back.

Reopening the list if the user clicks again on the input seems a sensible strategy.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Mar 3, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 37eddb9:

Sandbox Source
reach-ui-template Configuration

@chaance
Copy link
Member

chaance commented Mar 29, 2021

I'm not sure this is needed. Here is an example where this behaves as expected. Do you have a reproduced issue where this doesn't already work?

https://codesandbox.io/s/infallible-chatelet-1qd37?file=/src/App.js

@chaance chaance added the Status: Awaiting Response Requested and awaiting a response from the issue creator label Mar 29, 2021
@ProggerPete
Copy link
Contributor Author

I'm not sure this is needed. Here is an example where this behaves as expected. Do you have a reproduced issue where this doesn't already work?

https://codesandbox.io/s/infallible-chatelet-1qd37?file=/src/App.js

Your example shows exactly the behaviour I think is a problem. The first time you click the input the list shows. If you click one of the list options it is selected and the lists closes. Intuitively, if I want to open the list again I will click again on the input. Doing so does not open the list.

This has been discussed further here : #758

The users I build for are far happier if they click to reopen the list and it certainly seems better to me, but perhaps we are unique. Using a fork isn't too problematic so I'm just doing that. However I think the component would be better if it supported this user story.

@chaance
Copy link
Member

chaance commented Mar 30, 2021

Ah, I see now. Thanks for linking to the issue for more context, I must have missed or forgotten that one. I'll take another look at this soon!

@chaance chaance added Status: Investigation Type: Feature New feature request Type: Enhancement General improvements or suggestions and removed Status: Awaiting Response Requested and awaiting a response from the issue creator Type: Feature New feature request labels Mar 30, 2021
@chaance chaance linked an issue Mar 30, 2021 that may be closed by this pull request
@chaance chaance added Status: Unreleased Issue addressed but not yet released and removed Status: Investigation labels Apr 20, 2021
@chaance chaance merged commit a53203e into reach:develop Apr 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Unreleased Issue addressed but not yet released Type: Enhancement General improvements or suggestions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

I think clicking the input in a Combobox should open the list.
2 participants