Skip to content

Commit

Permalink
Zoon Out: Fix scale calculations (#64478)
Browse files Browse the repository at this point in the history
  • Loading branch information
scruffian authored Aug 14, 2024
1 parent e076070 commit 7498ac2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/block-editor/src/components/iframe/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,10 @@ function Iframe( {
const isZoomedOut = scale !== 1;

useEffect( () => {
prevContainerWidth.current = containerWidth;
}, [ containerWidth ] );
if ( ! isZoomedOut ) {
prevContainerWidth.current = containerWidth;
}
}, [ containerWidth, isZoomedOut ] );

const disabledRef = useDisabled( { isDisabled: ! readonly } );
const bodyRef = useMergeRefs( [
Expand Down

0 comments on commit 7498ac2

Please sign in to comment.