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

[MultiSelect][base] Require a single tap to select an item on mobile Chrome #33932

Merged

Conversation

michaldudak
Copy link
Member

@michaldudak michaldudak commented Aug 15, 2022

Mobile Chrome emulates onMouseOver when an option is tapped. This causes both mouseover and click actions to be dispatched next to each other. The MultiSelect behavior is broken in such case. This PR changes the mouseover to pointerover (which is not emulated when tapping on an element), preventing the problem.

Fixes #34151

@mui-bot
Copy link

mui-bot commented Aug 15, 2022

Details of bundle changes

Generated by 🚫 dangerJS against 705d287

@michaldudak michaldudak added bug 🐛 Something doesn't work component: select This is the name of the generic UI component, not the React module! package: base-ui Specific to @mui/base labels Aug 18, 2022
@michaldudak michaldudak force-pushed the multiselect-mobile-double-tap-error branch from 6fd7e1a to 705d287 Compare August 30, 2022 10:28
@michaldudak michaldudak marked this pull request as ready for review August 30, 2022 11:09
@mnajdova
Copy link
Member

mnajdova commented Aug 31, 2022

Can you link the issue that we are fixing? It would help with the review. I am asking because I can't see any issue on Chrome on iOS.

@michaldudak
Copy link
Member Author

There was no issue reported, I've noticed it myself. I'll create one for reference.

Copy link
Member

@mnajdova mnajdova left a comment

Choose a reason for hiding this comment

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

Thanks, I've verified that it works in both mobile & desktop chrome.

@mnajdova mnajdova merged commit b0818c4 into mui:master Sep 26, 2022
@michaldudak michaldudak deleted the multiselect-mobile-double-tap-error branch October 10, 2022 09:09
alexfauquette pushed a commit to alexfauquette/material-ui that referenced this pull request Oct 14, 2022
daniel-rabe pushed a commit to daniel-rabe/material-ui that referenced this pull request Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: select This is the name of the generic UI component, not the React module! package: base-ui Specific to @mui/base
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[MultiSelect][base] Unstyled MultiSelect requires double tap to select items on mobile Chrome
3 participants