+ 5
How do you setup the right click in mobile.
I want to add right click on my code but how do I do it on a mobile interface and how to add it .
1 Resposta
+ 6
Right click doesn't have any sense i a touch device context... however, right click behaviour is mostly emulated by a long press, but long press is also mostly used as text selection: so, you need to desactivate user text selection on elements wich you want to handle the long press. Anyway, touch events are very basic in web context, and there no built-in "long press" event: you need to implement it (by yourself or through use of a framework) using "touchstart" and "touchend" events, and react if time before finger release is enough ^^