diff --git a/packages/edit-post/src/components/visual-editor/index.js b/packages/edit-post/src/components/visual-editor/index.js index fe14ef0556113..f888630afeca1 100644 --- a/packages/edit-post/src/components/visual-editor/index.js +++ b/packages/edit-post/src/components/visual-editor/index.js @@ -334,11 +334,19 @@ export default function VisualEditor( { styles } ) { .is-root-container.alignfull { max-width: none; margin-left: auto; margin-right: auto;} .is-root-container.alignfull:where(.is-layout-flow) > :not(.alignleft):not(.alignright) { max-width: none;}`; + const isToBeIframed = + ( ( hasV3BlocksOnly || ( isGutenbergPlugin && isBlockBasedTheme ) ) && + ! hasMetaBoxes ) || + isTemplateMode || + deviceType === 'Tablet' || + deviceType === 'Mobile'; + return ( diff --git a/packages/edit-post/src/components/visual-editor/style.scss b/packages/edit-post/src/components/visual-editor/style.scss index 00678f9867ec3..fa61cc9889cf9 100644 --- a/packages/edit-post/src/components/visual-editor/style.scss +++ b/packages/edit-post/src/components/visual-editor/style.scss @@ -2,7 +2,11 @@ position: relative; display: flex; flex-flow: column; - overflow: hidden; + // In the iframed canvas this keeps extra scrollbars from appearing (when block toolbars overflow). In the + // legacy (non-iframed) canvas, overflow must not be hidden in order to maintain support for sticky positioning. + &:not(.has-inline-canvas) { + overflow: hidden; + } // Gray preview overlay (desktop/tablet/mobile) is intentionally not set on an element with scrolling content like // interface-interface-skeleton__content. This causes graphical glitches (flashes of the background color)