diff --git a/packages/block-editor/src/components/iframe/index.js b/packages/block-editor/src/components/iframe/index.js index 543f3cedbc87bd..55da4d15ce5ef1 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 17f983293f1d46..9f4aed98359069 100644 --- a/packages/editor/src/components/visual-editor/index.js +++ b/packages/editor/src/components/visual-editor/index.js @@ -344,7 +344,7 @@ function VisualEditor( { const zoomOutProps = isZoomOutMode ? { scale: 'default', - frameSize: '48px', + frameSize: 48, } : {};