diff --git a/packages/block-editor/src/components/typewriter/index.js b/packages/block-editor/src/components/typewriter/index.js index 8e3cbe140d9917..ac83d173a95d9d 100644 --- a/packages/block-editor/src/components/typewriter/index.js +++ b/packages/block-editor/src/components/typewriter/index.js @@ -105,7 +105,9 @@ export function useTypewriter() { return; } - const windowScroll = scrollContainer === ownerDocument.body; + const windowScroll = + scrollContainer === ownerDocument.body || + scrollContainer === ownerDocument.documentElement; const scrollY = windowScroll ? defaultView.scrollY : scrollContainer.scrollTop; diff --git a/packages/edit-post/src/components/visual-editor/index.js b/packages/edit-post/src/components/visual-editor/index.js index 682f00be4278d8..05ec36b06a1143 100644 --- a/packages/edit-post/src/components/visual-editor/index.js +++ b/packages/edit-post/src/components/visual-editor/index.js @@ -310,7 +310,11 @@ export default function VisualEditor( { styles } ) { ...styles, { // We should move this in to future to the body. - css: `.edit-post-visual-editor__post-title-wrapper{margin-top:4rem}`, + css: + `.edit-post-visual-editor__post-title-wrapper{margin-top:4rem}` + + ( paddingBottom + ? `body{padding-bottom:${ paddingBottom }}` + : '' ), }, ], [ styles ] @@ -358,7 +362,6 @@ export default function VisualEditor( { styles } ) { contentRef={ contentRef } styles={ styles } assets={ assets } - style={ { paddingBottom } } > { themeSupportsLayout && ! themeHasDisabledLayoutStyles &&