jeudi 1 janvier 2015

How to prevent long tap context menu in HTML/JS on IOS? [duplicate]



I need a way to disable the "right click" context menu that appears on links and other elements when they are long tapped.



$("body").on("contextmenu", ".thoseEleements", function(e){
e.preventDefault();
return false;
});


This works for desktop and Android, but not for IOS. I'm not using jQuery Mobile but normal jQuery is available, if needed for the solution. I know it's not the best way to prevent images from being stolen but there is a need for it in my product.


enter image description here





Aucun commentaire:

Enregistrer un commentaire