You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(menu): accidentally tapping on sub-menu content that overlaps trigger on touch devices (#14538)
We depend on the `mouseenter` event to switch between sub-menus, both on touch and mouse devices. Since `mouseenter` is emulated on touch devices, it fires much earlier in the event chain which means that the sub-menu can be shown before the user has lifted their finger. This can be an issue if the sub-menu overlaps the trigger in which case a click will be triggered on the content. These changes fix the issue by re-using an earlier fix that blocks interactions with the panel while it's animating.
Note: an alternate approach can be to do something something similar to what we did with the ripples where we block `mouseenter` for a period after the last `touchstart` event. The problem of doing so is that it'll block all `mouseenter` events on touch devices which we depend on to toggle the panel when switching from one sub-menu to another.
0 commit comments