From ba43843340c9f6395939f816df0f20dff027caa2 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Thu, 31 Mar 2016 12:27:08 +1300 Subject: [PATCH] Disable right-click context menu --- examples/html/entityList.html | 5 +++++ examples/html/entityProperties.html | 4 ++++ examples/html/gridControls.html | 5 +++++ examples/particle_explorer/particleExplorer.html | 8 +++++++- 4 files changed, 21 insertions(+), 1 deletion(-) diff --git a/examples/html/entityList.html b/examples/html/entityList.html index 2260fbdbd6..57b96afbfe 100644 --- a/examples/html/entityList.html +++ b/examples/html/entityList.html @@ -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); } diff --git a/examples/html/entityProperties.html b/examples/html/entityProperties.html index c92ac3f264..e64d519137 100644 --- a/examples/html/entityProperties.html +++ b/examples/html/entityProperties.html @@ -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); } diff --git a/examples/html/gridControls.html b/examples/html/gridControls.html index 9563e85903..429ab45d0e 100644 --- a/examples/html/gridControls.html +++ b/examples/html/gridControls.html @@ -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); } diff --git a/examples/particle_explorer/particleExplorer.html b/examples/particle_explorer/particleExplorer.html index d69d221306..2ab89c98ca 100644 --- a/examples/particle_explorer/particleExplorer.html +++ b/examples/particle_explorer/particleExplorer.html @@ -20,6 +20,12 @@ - +