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

[DropdownMenu] Fix touch devices trigger bug #3241

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jasongerbes
Copy link

@jasongerbes jasongerbes commented Nov 21, 2024

Description

Fixes an issue where DropdownMenuTrigger would open inadvertently on touch-based scroll (#1912).

The previous PR for this fix (#2616) was rejected as it broke a feature where the user can select an item in one click (pointer down on trigger, move, pointer up on item). This PR retains that behaviour.

See the related PR (#2939) for the Select component.

Touch before:

before.mov

Touch after:

after.mov

Pointer down behaviour for mouse devices has been preserved:

Screen.Recording.2024-11-21.at.11.13.27.PM.mov

Note: I was unable to replicate #1658 (also addressed in #2939) with the Dropdown Menu component, so I haven't copied the changes that were made to SelectItem over to DropdownMenuItem. Happy to do so if you'd like me to.

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.

1 participant