We have moved to GitHub Issues
Created by Niels Hartvig 12 Dec 2014, 10:47:30 Updated by Stephan 19 Jun 2015, 14:04:55
Relates to: U4-3842
Currently the only way to close the preview is to close the window/tab. We should add a "Close Preview" button in the left panel.
Bonus info: When you close the preview window and then subsequently view the page in the actual frontend of the site (e.g. via "Properties" tab, "Link to document"), the page is still in Preview Mode (or at least the Preview Badge is showing) - I don't know if this could actually cause a problem where an Editor wouldn't see the real content?
The preview badge is how you close the preview. However... the preview badge is only shown on templates that inherit from UmbracoViewPage
Articulate and other custom templates need to be fixed manually but there's an extension method for that to render the preview badge:
@Shandem I don't think I follow? When I preview a page, the preview badge is rendered, but it's hidden with CSS (in the "Umbraco Canvas Designer", that is...) - so it's not possible to correctly close the preview.
It is a flaw - the preview definitely needs a close button.
I have also experienced the issue that the CSS that I generate can sometimes hide the preview badge which leads to all sorts of confusion among editors (a relatively thick menu bar at the top of the page with a sufficiently high z-index I believe is at fault)
@greygreystate & @email@example.com - Just FYI the preview badge markup is 100% editable, this is configured in umbracoSettings.config see: https://our.umbraco.org/documentation/Using-Umbraco/Config-files/umbracoSettings/#Content under 'previewBadge'
Thanks for the heads up Shannon!
Just to correct my comment earlier about the badge being hidden with CSS - that was based on quick DOM inspection, but it looks like it's actually being done from JS:
Which makes me think that it won't help to change the markup in any way, since it's being purposefully hidden for some reason in the JS before displaying the "Canvas Designer"?
(Or am I missing something?)
Just so you know, the preview badge appears only when you're not in the new responsive preview. So if you've previewed a page and then go to mysite.com/mypage the badge does still show up.
Hrm not sure about that, the badge is part of the contents of the iframe that exists inside the preview
Looks like it's being hidden via JS for me as Chriztian suggested. Commenting out [https://github.com/umbraco/Umbraco-CMS/blob/9aa5df43bf4ed90e2ee02dc3bad6803c17676cd3/src/Umbraco.Web.UI.Client/src/canvasdesigner/canvasdesigner.controller.js#L491-L493 these lines] causes the button to show again. (using old preview)
hrm, not familiar with that code, not sure why it's setting the badge style to nothing?
Yeah, I'm not sure either - my guess though is that maybe it's supposed to be disabled for the "new responsive preview" and is getting leaked into the old one too? Just a hunch :)
The only sense I can make of it is that there was supposed to be a prominent "Close Preview" button in the "devices" sidebar, which didn't make it to the final version...
(Checking the "blame" view of the file on GitHub says it was part of a huge update that renamed a lot of stuff...)
oh joy, ok i'll investigate :)
Fixed, see 09552d282f5bba1c50863a054376ae6baf85415a e639869bb13f6c9fe0a6d5cbc3b79a8e78b002d4
Type: Usability Problem
Backwards Compatible: True
Affected versions: 7.2.0
Due in version: 7.3.0