diff --git a/layouts/scripts/frame-index.js b/layouts/scripts/frame-index.js index 6586b67..c75cb14 100644 --- a/layouts/scripts/frame-index.js +++ b/layouts/scripts/frame-index.js @@ -8,8 +8,10 @@ function setupResizeListener() { const RESIZE_CODE = 'resize:'; const resizeObserver = new ResizeObserver(entries => { - const height = document.body.scrollHeight; - window.parent.postMessage(RESIZE_CODE + JSON.stringify({height}), '*'); + setTimeout(() => { + const height = document.body.scrollHeight; + window.parent.postMessage(RESIZE_CODE + JSON.stringify({height}), '*'); + }, 200); }) resizeObserver.observe(document.body);