diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js index 02f6164f64..7a681c07f4 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/content/edit.controller.js @@ -941,15 +941,13 @@ const openPreviewWindow = () => { // Chromes popup blocker will kick in if a window is opened // without the initial scoped request. This trick will fix that. - // - const previewWindow = $window.open('preview/?init=true', 'umbpreview'); + + const previewWindow = $window.open(`preview/?id=${content.id}${$scope.culture ? `&culture=${$scope.culture}` : ''}`, 'umbpreview'); + + previewWindow.addEventListener('load', () => { + previewWindow.location.href = previewWindow.document.URL; + }); - // Build the correct path so both /#/ and #/ work. - let query = 'id=' + content.id; - if ($scope.culture) { - query += "#?culture=" + $scope.culture; - } - previewWindow.location.href = Umbraco.Sys.ServerVariables.umbracoSettings.umbracoPath + '/preview/?' + query; } //The user cannot save if they don't have access to do that, in which case we just want to preview