Quiere deshabilitar Presione prolongadamente todas las imágenes en la página web. ¿Alguien podría recomendarme una forma sencilla de hacerlo? También soy un novato en Java Script.
Probé "eventos de puntero: ninguno" en CSS. Pero también deshabilitó el clic. He usado las imágenes como un hipervínculo, por lo que no se puede evitar hacer clic.
function absorbEvent_(event) { var e = event || window.event; e.preventDefault && e.preventDefault(); e.stopPropagation && e.stopPropagation(); e.cancelBubble = true; e.returnValue = false; return false; } function preventLongPressMenu(node) { node.ontouchstart = absorbEvent_; node.ontouchmove = absorbEvent_; node.ontouchend = absorbEvent_; node.ontouchcancel = absorbEvent_; } function init() { preventLongPressMenu(document.getElementById('theimage')); }Fuente: https://newbedev.com/disabling-the-context-menu-on-long-taps-on-android