diff --git a/packages/block-editor/src/components/iframe/index.js b/packages/block-editor/src/components/iframe/index.js index 543f3cedbc87b..55da4d15ce5ef 100644 --- a/packages/block-editor/src/components/iframe/index.js +++ b/packages/block-editor/src/components/iframe/index.js @@ -235,7 +235,7 @@ function Iframe( { ); defaultView.frameElement.style.setProperty( '--wp-block-editor-iframe-zoom-out-inset', - inset === 'number' ? `${ inset }px` : inset + inset ); } else { documentElement.classList.remove( 'is-zoomed-out' ); @@ -267,7 +267,9 @@ function Iframe( { refZoomOutStatus.current.effect = ( isActive, nextWidth ) => { if ( isActive ) { const { priorContainerWidth } = refZoomOutStatus.current; - actualizeZoom( nextWidth / priorContainerWidth, frameSize ); + nextWidth -= frameSize * 2; + const nextScale = nextWidth / priorContainerWidth; + actualizeZoom( nextScale, `${ frameSize }px` ); clearTimeout( refZoomOutStatus.current.timerId ); refZoomOutStatus.current.timerId = setTimeout( () => { refZoomOutStatus.current.effect = null; diff --git a/packages/editor/src/components/visual-editor/index.js b/packages/editor/src/components/visual-editor/index.js index 88d2dac8ffd77..b5aa3fed8d1a6 100644 --- a/packages/editor/src/components/visual-editor/index.js +++ b/packages/editor/src/components/visual-editor/index.js @@ -341,7 +341,7 @@ function VisualEditor( { isZoomedOut && ! isTabletViewport ? { scale: 'default', - frameSize: '48px', + frameSize: 48, } : {};