diff --git a/scripts/scripts.js b/scripts/scripts.js index 06c142a6c..bffd96b74 100644 --- a/scripts/scripts.js +++ b/scripts/scripts.js @@ -754,10 +754,10 @@ function addHreflangTags() { */ export function iframeResizeHandler(iframeURL, iframeID, root) { loadScript('/scripts/iframeResizer.min.js'); - root.querySelector('iframe').addEventListener('load', async () => { + root.querySelector('iframe').addEventListener('load', () => { if (iframeURL) { /* global iFrameResize */ - iFrameResize({ log: false }, `#${iframeID}`); + iFrameResize({ log: false, checkOrigin: false, heightCalculationMethod: 'bodyScroll' }, `#${iframeID}`); } }); } diff --git a/templates/landing-page/landing-page.js b/templates/landing-page/landing-page.js index 8bb044261..fad03f898 100644 --- a/templates/landing-page/landing-page.js +++ b/templates/landing-page/landing-page.js @@ -10,7 +10,11 @@ async function iframeResizeHandler() { }); /* global iFrameResize */ - iFrameResize({ log: false }); + setTimeout(() => { + iFrameResize({ + log: true, + }, '#iframeContent'); + }, 1000); } function handleEmbed() { @@ -42,6 +46,7 @@ function handleEmbed() { if (record.target.tagName === 'IFRAME' && grandGrandParent.classList.contains('embed') ) { + // iframeResizeHandler(iframeURL, iframeID, root); const { height } = record.target.style; if (height) { const parent = record.target.parentElement;