For me, when I check
bool inEditMode = PageEditing.PageIsInEditMode;
is false when in preview mode.
I set a class to my container div according to this info, so I can use it in js.
Also, I have active=true in the querystring, don't you?
See a screenshot: http://postimg.org/image/krv6lr793/
Perhaps I misunderstood you?
Actually, I get 'true' from that parameter in preview-mode. Looking at your screenshot, my url doesn't change at all. What version of Episerver do you use?
Yes, the fact that a version could be different crossed my mind too, as I don't remembed having this extended preview before I did the upgrade. I have 7.0.586.16 (should be the latest version). How about you?
I'm using 7.0.586.1. But it seems like you have a UI-addon installed (can see the "SV" icon in yourscreenshot), I installed that addon in another project (7.0.586.8) but have the same issue in that project. I'll try to install the latest UI, maybe that will help
Regarding the querystring in your screeenshot, "viewsetting=active:///true" is only changed when clicking on the icon for "toggle view settings" (the icon that looks like an eye). The preview-button doesn't seem to change the url
It's the same when I click preview, the value inEditMode is false.
It might be the version, now I have also upgraded to the latest patch 4.
Upgrading to 7.0.586.24 fixed this issue. The preview works fine for me now
Is it possible to detect if the page is rendered in previewmode. It seems like the request is exactly the same as in edit mode?