Skip to content

Commit

Permalink
Force px value for frameSize
Browse files Browse the repository at this point in the history
  • Loading branch information
jeryj committed Oct 10, 2024
1 parent a444cdb commit 7af85bd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/block-editor/src/components/iframe/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,11 @@ function Iframe( {
prevContainerWidthRef.current
: scale
);

// frameSize has to be a px value for the scaling and frame size to be computed correctly.
iframeDocument.documentElement.style.setProperty(
'--wp-block-editor-iframe-zoom-out-frame-size',
typeof frameSize === 'number' ? `${ frameSize }px` : frameSize
`${ frameSize }px`
);
iframeDocument.documentElement.style.setProperty(
'--wp-block-editor-iframe-zoom-out-content-height',
Expand Down

0 comments on commit 7af85bd

Please sign in to comment.