From 7cbe50b2f156178d1432acc475a5f9b0e09ca261 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Tue, 4 Aug 2020 11:23:13 +0200 Subject: [PATCH] need to define active always, in order for it to become false. --- .../blockeditor/blockeditor.controller.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/blockeditor/blockeditor.controller.js b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/blockeditor/blockeditor.controller.js index f515cbb4ba..b8c6f1f27b 100644 --- a/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/blockeditor/blockeditor.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/common/infiniteeditors/blockeditor/blockeditor.controller.js @@ -23,17 +23,14 @@ angular.module("umbraco") if (contentApp) { if (vm.model.hideContent) { apps.splice(apps.indexOf(contentApp), 1); - } else if (vm.model.openSettings !== true) { - contentApp.active = true; } + contentApp.active = (vm.model.openSettings !== true); } if (vm.model.settings && vm.model.settings.variants) { var settingsApp = apps.find(entry => entry.alias === "settings"); if (settingsApp) { - if (vm.model.openSettings) { - settingsApp.active = true; - } + settingsApp.active = (vm.model.openSettings === true); } } @@ -55,7 +52,7 @@ angular.module("umbraco") vm.close = function () { if (vm.model && vm.model.close) { - // TODO: At this stage there could very well have been server errors that have been cleared + // TODO: At this stage there could very well have been server errors that have been cleared // but if we 'close' we are basically cancelling the value changes which means we'd want to cancel // all of the server errors just cleared. It would be possible to do that but also quite annoying. // The rudimentary way would be to: