jQuery-contextMenu
jQuery-contextMenu copied to clipboard
Opening overlapping submenu on mobile triggers sub-item action
Steps to reproduce:
- go to https://swisnl.github.io/jQuery-contextMenu/demo/sub-menus.html in Chrome
- open Developer tools (
Ctrl + Shift + I
) - use mobile device view (
Ctrl + Shift + M
) - Use a quite small device, e.g. Galaxy S5
- Open the context menu of the demo by long tap
- Select "Sub-Group" by tap
- Alert opens -> sub-item of "Sub-Group" has been selected because it's positioned above the "Sub-Group" item and somehow the tap directly triggers the action of the overlapping element without even showing the submenu
Hmm, yeah that is a problem. I checked your PR and it seems you add a delay after opening. Not sure if that is the way to get that fixed.
Yeah, I've added a timeout of 100ms where the unintended action is ignored. For sure it's not a pretty solution, but it works. Feel free to change it to a more beautiful solution.