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

Select loses focus after selection #937

Closed
doctorj opened this issue May 21, 2024 · 2 comments
Closed

Select loses focus after selection #937

doctorj opened this issue May 21, 2024 · 2 comments
Assignees
Labels
bug Something isn't working version 2.x.x Version 2.x.x issues
Milestone

Comments

@doctorj
Copy link

doctorj commented May 21, 2024

After value is selected, element doesn't have focus anymore. It happens when value is selected with keyboard (enter) and also when value is selected with mouse.

Here is an example from domino-ui demo where pressing tab after selecting passes focus to first element at the top.

select.mp4
@FrankHossfeld
Copy link
Contributor

Yep, have seen that also. Makes working with forms much more difficult.

@vegegoku vegegoku self-assigned this Jun 25, 2024
@vegegoku vegegoku added bug Something isn't working version 2.x.x Version 2.x.x issues labels Jun 25, 2024
@vegegoku vegegoku added this to the 2.0.2 milestone Jun 25, 2024
@doctorj
Copy link
Author

doctorj commented Jul 1, 2024

@FrankHossfeld

I compared AbstractSelect and AbstractSuggestBox and noticed that there is close listener (which is missing in AbstractSelect) for SuggestBox options menu added, like this

.addCloseListener(component -> focus())

So, you can just try something like this for yours Selects and it should work:

yourSelect.getOptionsMenu().addCloseListener(component -> yourSelect.focus());

@vegegoku vegegoku changed the title Select loses focus after selection (v2) Select loses focus after selection Jul 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working version 2.x.x Version 2.x.x issues
Projects
Status: Done
Development

No branches or pull requests

3 participants