diff --git a/web/src/beta/features/Visualizer/Crust/Plugins/PluginFrame/SafeIFrame/hooks.ts b/web/src/beta/features/Visualizer/Crust/Plugins/PluginFrame/SafeIFrame/hooks.ts index 91175f62f..a1850add7 100644 --- a/web/src/beta/features/Visualizer/Crust/Plugins/PluginFrame/SafeIFrame/hooks.ts +++ b/web/src/beta/features/Visualizer/Crust/Plugins/PluginFrame/SafeIFrame/hooks.ts @@ -153,10 +153,8 @@ export default function useHook({ const st = win.getComputedStyle(html, ""); horizontalMargin = parseInt(st.getPropertyValue("margin-left"), 10) + parseInt(st.getPropertyValue("margin-right"), 10); verticalMargin = parseInt(st.getPropertyValue("margin-top"), 10) + parseInt(st.getPropertyValue("margin-bottom"), 10); - const horizontalScrollbarHeight = window.innerHeight - document.documentElement.clientHeight; - const verticalScrollbarWidth = window.innerWidth - document.documentElement.clientWidth; - const width = html.offsetWidth + horizontalMargin + verticalScrollbarWidth; - const height = html.offsetHeight + verticalMargin + horizontalScrollbarHeight; + const width = html.offsetWidth + horizontalMargin; + const height = html.offsetHeight + verticalMargin; if(parent){ parent.postMessage({ [${JSON.stringify(autoResizeMessageKey)}]: { width, height }