diff --git a/src/resources/js/lib/configure-editor.js b/src/resources/js/lib/configure-editor.js index ac491385..2f11b331 100644 --- a/src/resources/js/lib/configure-editor.js +++ b/src/resources/js/lib/configure-editor.js @@ -57,10 +57,11 @@ function disableWPBlocks () { */ function setMaxHeight (maxHeight) { const editor = window.Laraberg.editor - const editPostLayout = editor.querySelector('.edit-post-layout__content') - editor.style.maxHeight = maxHeight - editPostLayout.style.maxHeight = `calc(${maxHeight} - 56px)` + + elementRendered('.edit-post-layout__content', (el) => { + el.style.minHeight = `calc(${maxHeight} - 56px)` + }) } /** @@ -69,9 +70,11 @@ function setMaxHeight (maxHeight) { */ function setMinHeight (minHeight) { const editor = window.Laraberg.editor - const sidebar = editor.querySelector('.edit-post-sidebar') editor.style.minHeight = minHeight - sidebar.style.minHeight = `calc(${minHeight} - 56px)` + + elementRendered('.edit-post-sidebar', (el) => { + el.style.minHeight = `calc(${minHeight} - 56px)` + }) } /** diff --git a/src/resources/scss/wordpress-overrides.scss b/src/resources/scss/wordpress-overrides.scss index cc13e200..6d37dfa5 100644 --- a/src/resources/scss/wordpress-overrides.scss +++ b/src/resources/scss/wordpress-overrides.scss @@ -45,10 +45,6 @@ padding-top: 0; } } - - // .block-editor__container { - // position: static; - // } } .gutenberg__editor.fixed-height {