diff --git a/packages/block-editor/src/components/iframe/index.js b/packages/block-editor/src/components/iframe/index.js index 536fc6f254b563..0bb7e30a942046 100644 --- a/packages/block-editor/src/components/iframe/index.js +++ b/packages/block-editor/src/components/iframe/index.js @@ -389,7 +389,10 @@ function Iframe( { // possible scrollTop positions. Round the value to avoid subpixel // truncation by the browser which sometimes causes a 1px error. scrollTopNext = Math.round( - Math.min( Math.max( 0, scrollTopNext ), maxScrollTop ) + Math.min( + Math.max( 0, scrollTopNext ), + Math.max( 0, maxScrollTop ) + ) ); iframeDocument.documentElement.style.setProperty(