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

[Menu] Don’t scroll menus in response to hover #2451

Merged
merged 1 commit into from
Jun 11, 2024

Conversation

cpmsmith
Copy link
Contributor

Description

By default, when a menu item is focused, browsers will scroll it into view. Sometimes even into the centre of the view. This is good when using a keyboard, because the focused item is automatically visible, but when it was focused in response to mouse movement, it has the effect of moving the item out from underneath the pointer.

Fixes #1566

Copy link
Collaborator

@benoitgrelard benoitgrelard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix @cpmsmith!

By default, when a menu item is focused, browsers will scroll it into view.
Sometimes even into the centre of the view. This is good when using a keyboard,
because the focused item is automatically visible, but when it was focused in
response to mouse movement, it has the effect of moving the item out from
underneath the pointer.

Fixes radix-ui#1566
@moshest
Copy link

moshest commented Mar 19, 2024

Can we merge this? :)

@jjenzz
Copy link
Contributor

jjenzz commented May 21, 2024

@benoitgrelard @andy-hook i see this has been approved. we've hit this issue at my workplace too. any plans to merge it?

@suitux
Copy link

suitux commented Jun 11, 2024

Any plans to merge this?

@vladmoroz vladmoroz merged commit cb9f04d into radix-ui:main Jun 11, 2024
5 checks passed
@suitux
Copy link

suitux commented Jun 11, 2024

Thanks!! :)

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.

[DropdownMenu] dropdown menu scrolls on hover
6 participants