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 hover scroll #1161

Merged
merged 4 commits into from
Feb 27, 2022
Merged

Fix hover scroll #1161

merged 4 commits into from
Feb 27, 2022

Conversation

RobinMalfait
Copy link
Collaborator

This PR is a continuation of #1058.

This will make sure that the scroll into view only happens if the active item/option gets activated automatically (e.g.: active when opened) or when it gets activated via the keyboard.
If the item/option gets activated via the mouse then we don't want to scroll into view because this feels a bit janky and fights against your scrollwheel.

Closes: #1058
Fixes: #769

yuta-ike and others added 3 commits February 26, 2022 23:46
For keyboard only for Combobox, Listbox and Menu for both React and Vue.
@vercel
Copy link

vercel bot commented Feb 27, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

headlessui-vue – ./packages/playground-vue

🔍 Inspect: https://vercel.com/tailwindlabs/headlessui-vue/AhCD5xXV8rpS471nLmcTBoJGLNn4
✅ Preview: https://headlessui-vue-git-fix-hover-scroll-tailwindlabs.vercel.app

headlessui-react – ./packages/playground-react

🔍 Inspect: https://vercel.com/tailwindlabs/headlessui-react/7Z2cyBAuVyoMKJRf3RUmB4qgptU9
✅ Preview: https://headlessui-react-git-fix-hover-scroll-tailwindlabs.vercel.app

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.

[Bug]: Listbox Hover Focus Shouldn't Cause Scroll
2 participants