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

Prevent closing the Combobox component when clicking inside the scrollbar area #3104

Merged
merged 2 commits into from
Apr 16, 2024

Conversation

RobinMalfait
Copy link
Collaborator

This PR ensures that clicking inside the scrollbar area of the ComboboxOptions does not close the Combobox.

The main issue (see #3071) is that clicking inside the scrollbar area moves focus into the TabPanel which blurs the ComboboxInput and in turn closes the Combobox.

Preventing the default behavior of the mousedown event when clicking inside the scrollbar area of the ComboboxOptions prevents the focus from moving to the TabPanel and keeps the Combobox open.

Fixes: #3071

Copy link

vercel bot commented Apr 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
headlessui-react ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 16, 2024 3:31pm
headlessui-vue ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 16, 2024 3:31pm

@RobinMalfait RobinMalfait merged commit 9f44656 into main Apr 16, 2024
8 checks passed
@RobinMalfait RobinMalfait deleted the fix/issue-3071 branch April 16, 2024 15:35
RobinMalfait added a commit that referenced this pull request Apr 16, 2024
…ollbar area (#3104)

* prevent closing `Combobox` when clicking inside the scrollbar area

* update changelog
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

Successfully merging this pull request may close these issues.

Can not use the combobox scrollbar inside the Tab or Radio Group components
2 participants