diff --git a/packages/block-editor/src/components/iframe/index.js b/packages/block-editor/src/components/iframe/index.js index d487bd12ebfec..13ce1116336c9 100644 --- a/packages/block-editor/src/components/iframe/index.js +++ b/packages/block-editor/src/components/iframe/index.js @@ -104,6 +104,7 @@ function Iframe( { contentRef, children, tabIndex = 0, + shouldZoom = false, readonly, forwardedRef: ref, ...props @@ -135,17 +136,18 @@ function Iframe( { // content within the viewport. // At 1000px wide, the iframe is scaled to 45%. // At 400px wide, the iframe is scaled to 90%. - const scale = ! isZoomOutMode - ? 1 - : calculateScale( - { - maxWidth: 1000, - minWidth: 400, - maxScale: 0.45, - minScale: 0.9, - }, - contentWidth - ); + const scale = + isZoomOutMode && shouldZoom + ? calculateScale( + { + maxWidth: 1000, + minWidth: 400, + maxScale: 0.45, + minScale: 0.9, + }, + contentWidth + ) + : 1; const frameSize = isZoomOutMode ? 100 : 0; const setRef = useRefEffect( ( node ) => { diff --git a/packages/edit-site/src/components/block-editor/editor-canvas.js b/packages/edit-site/src/components/block-editor/editor-canvas.js index f172a6ff589cc..c3ee980515e6c 100644 --- a/packages/edit-site/src/components/block-editor/editor-canvas.js +++ b/packages/edit-site/src/components/block-editor/editor-canvas.js @@ -107,6 +107,7 @@ function EditorCanvas( { enableResizing, settings, children, ...props } ) { renderAppender={ showBlockAppender } styles={ styles } iframeProps={ { + shouldZoom: true, className: classnames( 'edit-site-visual-editor__editor-canvas', {