Long pressing a button on mobile causes neighbouring text to be selected #26735
Open
Description
This can also be observed on the official page of the button component. Since the button has user-select: none
, long pressing it on mobile does not select it's inner text, but instead starts selecting the next "user-selectable" text. This has been observed on iOS only, other devices unknown, maybe someone could confirm.
- The issue is present in the latest release.
- I have searched the issues of this repository and believe that this is not a duplicate.
Current Behavior 😯
Long pressing a button on mobile selects the neighbouring text.
Expected Behavior 🤔
Long pressing a button on mobile does not select any text at all.
Steps to Reproduce 🕹
Steps:
- Go to the button documentation page on a mobile device: https://material-ui.com/components/buttons/
- Long press one of the button examples
- Observe the next selectable text is selected
Context 🔦
I was trying to detect long presses on a button and although it works, it is annoying to see that some text is being selected elsewhere.
Your Environment 🌎
Material UI's website on iOS 14.4.2 Safari/Chrome/Firefox