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

fix(useSelect): preventDefault on item props onMouseDown #1547

Merged
merged 2 commits into from
Sep 25, 2023

Conversation

silviuaavram
Copy link
Collaborator

@silviuaavram silviuaavram commented Sep 25, 2023

What:
Prevent default on getItemProps onMouseDown for useSelect.
Closes #1537.

Why:
Keep the focus on the toggle button when item is selected by mouse click.

How:
This was overlooked since for very long the focus strategy with useSelect was different (switch between toggle and menu).

Checklist:

  • Documentation
  • Tests
  • TypeScript Types
  • Flow Types
  • Ready to be merged

@silviuaavram silviuaavram force-pushed the fix/prevent-defrault-on-mouse-down branch from cd3995d to 0c818bd Compare September 25, 2023 07:11
@silviuaavram silviuaavram force-pushed the fix/prevent-defrault-on-mouse-down branch from 0c818bd to bc04626 Compare September 25, 2023 07:11
@silviuaavram silviuaavram merged commit 05ffa9c into master Sep 25, 2023
2 checks passed
@silviuaavram silviuaavram deleted the fix/prevent-defrault-on-mouse-down branch September 25, 2023 07:40
@github-actions
Copy link

🎉 This PR is included in version 8.2.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[useSelect] Toggle button lost focus
1 participant