After updating the iOS version to 13.1, we encountered an issue where the long-press context menu event is not triggering in the browser. Instead, the default browser context menu is being displayed. Our goal is to hide these context menus.
!DOCTYPE html>
<html>
<head>
<style>
div {
background: yellow;
border: 1px solid black;
padding: 10px;
}
</style>
</head>
<body>
<div id="myDIV">
<p>Right-click inside this box to see the context menu!
</div>
<script>
document.getElementById("myDIV").addEventListener("contextmenu", myFunction);
function myFunction() {
alert('context menu fired');
}
</script>
</body>
</html>