From 651006fbaf971978ae4d039e22b87489d9ccff03 Mon Sep 17 00:00:00 2001 From: Kenn Jacobsen Date: Mon, 14 Jan 2019 22:27:01 +0100 Subject: [PATCH] Make sure to update cculture to the last open culture when closing the split view --- .../components/content/umbvariantcontenteditors.directive.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbvariantcontenteditors.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbvariantcontenteditors.directive.js index e413701a26..d0c7af2789 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbvariantcontenteditors.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/umbvariantcontenteditors.directive.js @@ -259,6 +259,8 @@ vm.editors.splice(editorIndex, 1); //remove variant from open variants vm.openVariants.splice(editorIndex, 1); + //update cculture to reflect the last open variant (closing the split view corresponds to selecting the other variant) + $location.search("cculture", vm.openVariants[0]); splitViewChanged(); }, 400); } @@ -269,7 +271,7 @@ * @param {any} editorIndex The index of the editor being changed */ function selectVariant(variant, editorIndex) { - + // prevent variants already open in a split view to be opened if(vm.openVariants.indexOf(variant.language.culture) !== -1) { return;