-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Click hijacking on mobile disrupting label behavior #4110
Comments
This is happening because the gesture code does not account for the fact that clicking on a Trying to find a fix. |
Sorry to reopen this issue, but I believe this problem is not completely fixed yet. If there is a span inside a label, then lastLabelClickPos doesn't get set properly. I tried applying the following fix:
The problem with this quick hack is that if an input is inside that label as well lastLabelClickPos will be updated on the browser-fired input click event. Any advice? |
Instead of checking for an ancestor label, the |
I tried doing that, but since the hijacker code was fired by a manual |
This issue is closed as part of our ‘Surge Focus on Material 2' efforts. |
Mobile users are not able to click on radio / checkbox buttons within a label. Specifically, when the user clicks on the label, the browser automatically fires a click on the input; but this code hijacks it and prevents it altogether.
I made a simple reproduction of the problem here. Visit with Chrome's device mode spoofing as Nexus 5 (remember to refresh after choosing device from the dropdown), and you'll find that clicking on the label does not toggle the radio button. Clicking on the input itself works, but not the label.
The text was updated successfully, but these errors were encountered: