diff --git a/packages/edit-post/src/components/layout/index.js b/packages/edit-post/src/components/layout/index.js
index ab8c393b8172f4..84220f37cf7e0e 100644
--- a/packages/edit-post/src/components/layout/index.js
+++ b/packages/edit-post/src/components/layout/index.js
@@ -417,6 +417,7 @@ function Layout( {
hasHistory,
isWelcomeGuideVisible,
templateId,
+ isDevicePreview,
} = useSelect(
( select ) => {
const { get } = select( preferencesStore );
@@ -424,6 +425,8 @@ function Layout( {
select( editPostStore )
);
const { canUser, getPostType } = select( coreStore );
+ const { getDeviceType, getEditorMode, getRenderingMode } =
+ select( editorStore );
const supportsTemplateMode = settings.supportsTemplateMode;
const isViewable =
@@ -434,7 +437,7 @@ function Layout( {
} );
return {
- mode: select( editorStore ).getEditorMode(),
+ mode: getEditorMode(),
isFullscreenActive:
select( editPostStore ).isFeatureActive( 'fullscreenMode' ),
hasActiveMetaboxes: select( editPostStore ).hasMetaBoxes(),
@@ -444,7 +447,7 @@ function Layout( {
isDistractionFree: get( 'core', 'distractionFree' ),
showMetaBoxes:
! DESIGN_POST_TYPES.includes( currentPostType ) &&
- select( editorStore ).getRenderingMode() === 'post-only',
+ getRenderingMode() === 'post-only',
isWelcomeGuideVisible: isFeatureActive( 'welcomeGuide' ),
templateId:
supportsTemplateMode &&
@@ -453,6 +456,7 @@ function Layout( {
! isEditingTemplate
? getEditedPostTemplateId()
: null,
+ isDevicePreview: getDeviceType() !== 'Desktop',
};
},
[ currentPostType, isEditingTemplate, settings.supportsTemplateMode ]
@@ -594,7 +598,11 @@ function Layout( {
extraContent={
! isDistractionFree &&
showMetaBoxes && (
-
+
)
}
>
diff --git a/packages/edit-post/src/components/layout/style.scss b/packages/edit-post/src/components/layout/style.scss
index 18f12c1dbfbb92..aa839f9171c08d 100644
--- a/packages/edit-post/src/components/layout/style.scss
+++ b/packages/edit-post/src/components/layout/style.scss
@@ -106,12 +106,15 @@
clear: both;
}
-.has-metaboxes .editor-visual-editor {
- flex: 1;
+// Only when the split view is active the visual editor should allow shrinking and
+// its main size should be zero.
+.has-metaboxes .interface-interface-skeleton__content:has(.edit-post-meta-boxes-main) .editor-visual-editor {
+ flex-shrink: 1;
+ flex-basis: 0%;
+}
- &.is-iframed {
- isolation: isolate;
- }
+.has-metaboxes .editor-visual-editor.is-iframed {
+ isolation: isolate;
}
// Adjust the position of the notices