Try our conversational search powered by Generative AI!

Previewing is not showing the entire page

Vote:
 

Hi,

I have a problem with previewing in episerver 10.10. After the first load episerver sets a fixed height on the iframe. Some of my page types have expandable sections on small screens. When these are expanded the height of the page is increased, but the fixed height of the iframe remains unchanged. The result is that parts of the page is pushed outside of the iframe and I am unable to scroll to the bottom of the page.

Do anyone have any suggestions for how to get around this?

#188089
Feb 12, 2018 13:51
Vote:
 

I realize this is bringing up an old thread, (looked down upon on some forums) but I noticed this issue with a similar component...

We have accordions and tabs that can change the displayed content on the page after preview loads, and therefore the fixed height of the preview iframe is insufficient and content can be cut off.

If there is an official front-end API 'event' we can trigger on the parent document of the preview page to force a recalculation, or any other solution, please let me/us know.

In the meantime, due to time constraints, I have the most pedestrian of solutions to this for you:

Since the iframe is within the same domain, you have access to the parent.document, and so you can create a previewOnly.js file with some JS code that will update the iframe height on whatever click/event of your particular components.

#229626
Oct 20, 2020 9:25
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.