diff --git a/src/Umbraco.Web.UI.Client/src/views/content/content.edit.controller.js b/src/Umbraco.Web.UI.Client/src/views/content/content.edit.controller.js index 6a80b5255d..cab656d24b 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/content.edit.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/content/content.edit.controller.js @@ -261,9 +261,15 @@ function ContentEditController($scope, $routeParams, $q, $timeout, $window, appS return performSave({ saveMethod: contentResource.save, statusMessage: "Saving..." }); }; - $scope.preview = function(content){ + $scope.preview = function (content) { + // Chromes popup blocker will kick in if a window is opened + // outwith the initial scoped request. This trick will fix that. + // + var previewWindow = $window.open('preview/?id=' + content.id, 'umbpreview'); $scope.save().then(function (data) { - $window.open('preview/?id=' + data.id, 'umbpreview'); + // Build the correct path so both /#/ and #/ work. + var redirect = Umbraco.Sys.ServerVariables.umbracoSettings.umbracoPath + '/preview/?id=' + data.id; + previewWindow.location.href = redirect; }); };