From 7f95753a1e893087f55c51f74b109f7db8f07d35 Mon Sep 17 00:00:00 2001 From: "Anthony J. Thibault" Date: Thu, 16 Feb 2017 16:18:51 -0800 Subject: [PATCH] Prevent tablet from being open while in toolbarMode --- scripts/system/tablet-ui/tabletUI.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/scripts/system/tablet-ui/tabletUI.js b/scripts/system/tablet-ui/tabletUI.js index 1dc6b7fef8..632cb40bb5 100644 --- a/scripts/system/tablet-ui/tabletUI.js +++ b/scripts/system/tablet-ui/tabletUI.js @@ -52,6 +52,15 @@ } function updateShowTablet() { + + // close the WebTablet if it we go into toolbar mode. + var toolbarMode = Tablet.getTablet("com.highfidelity.interface.tablet.system").toolbarMode; + if (tabletShown && toolbarMode) { + hideTabletUI(); + HMD.closeTablet(); + return; + } + if (tabletShown) { var MUTE_MICROPHONE_MENU_ITEM = "Mute Microphone"; var currentMicEnabled = !Menu.isOptionChecked(MUTE_MICROPHONE_MENU_ITEM); @@ -67,7 +76,7 @@ // other reason, close the tablet. hideTabletUI(); HMD.closeTablet(); - } else if (HMD.showTablet && !tabletShown) { + } else if (HMD.showTablet && !tabletShown && !toolbarMode) { UserActivityLogger.openedTablet(); showTabletUI(); } else if (!HMD.showTablet && tabletShown) {