mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 08:23:04 +02:00
Disable right-click context menu
This commit is contained in:
parent
870636832f
commit
ba43843340
4 changed files with 21 additions and 1 deletions
|
@ -267,6 +267,11 @@
|
||||||
window.onresize = resize;
|
window.onresize = resize;
|
||||||
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>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
|
@ -1289,6 +1289,10 @@
|
||||||
elDropdowns = document.getElementsByTagName("select");
|
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>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
|
@ -119,6 +119,11 @@
|
||||||
|
|
||||||
EventBridge.emitWebEvent(JSON.stringify({ type: 'init' }));
|
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>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
|
@ -20,6 +20,12 @@
|
||||||
<script type="text/javascript" src="../html/eventBridgeLoader.js"></script>
|
<script type="text/javascript" src="../html/eventBridgeLoader.js"></script>
|
||||||
<script type="text/javascript" src="particleExplorer.js?v42"></script>
|
<script type="text/javascript" src="particleExplorer.js?v42"></script>
|
||||||
<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>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
|
|
||||||
|
@ -60,7 +66,7 @@ body{
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body onload="loaded();">
|
||||||
<div class="importer">
|
<div class="importer">
|
||||||
<input type='text' id="importer-input" placeholder="Import: Paste JSON here." onkeypress="handleInputKeyPress(event)">
|
<input type='text' id="importer-input" placeholder="Import: Paste JSON here." onkeypress="handleInputKeyPress(event)">
|
||||||
<div class = "exported-props-section">
|
<div class = "exported-props-section">
|
||||||
|
|
Loading…
Reference in a new issue