How can we help you today?

Modern SharePoint Page Doesn't Work in Lightbox


You have linked to a modern SharePoint page and set it to open in a Lightbox, but there is an error when you try to open the page in the Lightbox.


Modern SharePoint pages have been configured by Microsoft not to work in iFrame, and ShortPoint Lightbox uses iFrame because iFrames are the only reliable way to display a page within another page.


Be rest assured that we have fixed this issue in a release that will soon be made public.

Please follow the steps below to fix the issue:

1. Open ShortPoint's Themebuilder on your site

2. In Themebuilder, navigate to Utilities > Custom Javascript

3. Copy the Javascript code below

var originalPostMessage = window.postMessage;
window.postMessage = function(msg, origin) {
if(origin.match(/ms-appx/) != null) {
shortpoint.log('preventing ms-appx post message', msg, origin);
return originalPostMessage.apply(this, arguments);

4. Paste it in the Custom Javascript textarea, see the screenshot below

5. Click Publish

The issue should now be resolved.


Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.

World's best intranet sites are designed using ShortPoint

Get started today! Learn more
See all 28 topics

Start a trial

Ignite your vision. Install ShortPoint directly on your site, or play in sandbox mode. No credit card required.

Get started today

World’s best intranet sites are designed using ShortPoint

Thousands of companies using ShortPoint everyday to design, brand and build award winning intranet sites.

Get started Learn more