Like the title says I'd like to disable the context menu after long click on pretty much every thing on my web page. This said, I still want all link to be active even if the context will not show up. One more thing, this will only be use in a local network where clients will be using the same tablets, OS and Web browser.
I've been trying this Solution but doesn't give me satisfaction cause it breaks the links. and other answers doesn't work for me. I'm no javascript pro so I may be missing some points...
the CSS -webkit-touch-callout: none !important; do not work on firefox if I'm not wrong.
So how to achieve this? CSS? HTML? JAVASCRIPT?
Thanks for your cooperation ;)
UPDATE
I've found this code which create the new contextmenu and prevent default but....
<script>
if (document.addEventListener) {
document.addEventListener('contextmenu', function(e) {
alert("You've tried to open context menu"); //here you draw your own menu
e.preventDefault();
}, false);
} else {
document.attachEvent('oncontextmenu', function() {
alert("You've tried to open context menu");
window.event.returnValue = false;
});
}
</script>
... the original context menu still opens after the new one :(