Disable right-click context menu

This commit is contained in:
David Rowe 2016-03-31 12:27:08 +13:00
parent 870636832f
commit ba43843340
4 changed files with 21 additions and 1 deletions

View file

@ -267,6 +267,11 @@
window.onresize = resize;
resize();
});
// Disable right-click context menu which is not visible in the HMD and makes it seem like the app has locked
document.addEventListener("contextmenu", function (event) {
event.preventDefault();
}, false);
}
</script>
</head>

View file

@ -1289,6 +1289,10 @@
elDropdowns = document.getElementsByTagName("select");
}
// Disable right-click context menu which is not visible in the HMD and makes it seem like the app has locked
document.addEventListener("contextmenu", function (event) {
event.preventDefault();
}, false);
}
</script>
</head>

View file

@ -119,6 +119,11 @@
EventBridge.emitWebEvent(JSON.stringify({ type: 'init' }));
});
// Disable right-click context menu which is not visible in the HMD and makes it seem like the app has locked
document.addEventListener("contextmenu", function (event) {
event.preventDefault();
}, false);
}
</script>
</head>

View file

@ -20,6 +20,12 @@
<script type="text/javascript" src="../html/eventBridgeLoader.js"></script>
<script type="text/javascript" src="particleExplorer.js?v42"></script>
<script>
function loaded() {
// Disable right-click context menu which is not visible in the HMD and makes it seem like the app has locked
document.addEventListener("contextmenu", function (event) {
event.preventDefault();
}, false);
}
</script>
<style>
@ -60,7 +66,7 @@ body{
</style>
</head>
<body>
<body onload="loaded();">
<div class="importer">
<input type='text' id="importer-input" placeholder="Import: Paste JSON here." onkeypress="handleInputKeyPress(event)">
<div class = "exported-props-section">