From c2064eed894c39f94a91730b8b98fc00b5e06ffd Mon Sep 17 00:00:00 2001 From: Alezia Kurdis <60075796+AleziaKurdis@users.noreply.github.com> Date: Sun, 27 Sep 2020 23:49:48 -0400 Subject: [PATCH] Fix a bug about tablet stuck in Landscape Fix a bug about tablet stuck in Landscape when the create app was open in desktop and you put your VR Headset on, then next time you open the tablet it was in landscape mode. (because a refresh was happening after the landscape set to false at the closure) Now the condition is geared to deal with the situation. --- scripts/system/create/edit.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/system/create/edit.js b/scripts/system/create/edit.js index 2fb38efad7..b051c19800 100644 --- a/scripts/system/create/edit.js +++ b/scripts/system/create/edit.js @@ -824,7 +824,7 @@ var toolBar = (function () { HMD.displayModeChanged.connect(function() { if (isActive) { - tablet.gotoHomeScreen(); + tablet.gotoHomeScreen(); } that.setActive(false); }); @@ -2339,8 +2339,12 @@ var PropertiesTool = function (opts) { }; function updateSelections(selectionUpdated, caller) { - if (HMD.active){ + if (HMD.active && visible){ webView.setLandscape(true); + } else { + if (!visible) { + webView.setLandscape(false); + } } if (blockPropertyUpdates) {