diff --git a/packages/edit-widgets/CHANGELOG.md b/packages/edit-widgets/CHANGELOG.md
index 6115fc42560f82..80fde2bfec86e7 100644
--- a/packages/edit-widgets/CHANGELOG.md
+++ b/packages/edit-widgets/CHANGELOG.md
@@ -2,6 +2,8 @@
## Unreleased
+## 6.9.0 (2024-10-03)
+
## 6.8.0 (2024-09-19)
## 6.7.0 (2024-09-05)
diff --git a/packages/edit-widgets/package.json b/packages/edit-widgets/package.json
index f0cc613aa40fc2..e9d0f18df460a6 100644
--- a/packages/edit-widgets/package.json
+++ b/packages/edit-widgets/package.json
@@ -1,6 +1,6 @@
{
"name": "@wordpress/edit-widgets",
- "version": "6.8.0",
+ "version": "6.9.0",
"description": "Widgets Page module for WordPress..",
"author": "The WordPress Contributors",
"license": "GPL-2.0-or-later",
diff --git a/packages/editor/CHANGELOG.md b/packages/editor/CHANGELOG.md
index 6f31c1735021f6..dbd2884ab88560 100644
--- a/packages/editor/CHANGELOG.md
+++ b/packages/editor/CHANGELOG.md
@@ -2,6 +2,8 @@
## Unreleased
+## 14.9.0 (2024-10-03)
+
## 14.8.0 (2024-09-19)
## 14.7.0 (2024-09-05)
diff --git a/packages/editor/package.json b/packages/editor/package.json
index 29cbffcfb72221..8781b0b992d94f 100644
--- a/packages/editor/package.json
+++ b/packages/editor/package.json
@@ -1,6 +1,6 @@
{
"name": "@wordpress/editor",
- "version": "14.8.0",
+ "version": "14.9.0",
"description": "Enhanced block editor for WordPress posts.",
"author": "The WordPress Contributors",
"license": "GPL-2.0-or-later",
diff --git a/packages/editor/src/components/header/index.js b/packages/editor/src/components/header/index.js
index f49ada48997ce5..631643f26d4d5f 100644
--- a/packages/editor/src/components/header/index.js
+++ b/packages/editor/src/components/header/index.js
@@ -1,6 +1,7 @@
/**
* WordPress dependencies
*/
+import { store as blockEditorStore } from '@wordpress/block-editor';
import { useSelect } from '@wordpress/data';
import { useMediaQuery, useViewportMatch } from '@wordpress/compose';
import { __unstableMotion as motion } from '@wordpress/components';
@@ -52,12 +53,13 @@ function Header( {
const isLargeViewport = useViewportMatch( 'medium' );
const isTooNarrowForDocumentBar = useMediaQuery( '(max-width: 403px)' );
const {
+ postType,
isTextEditor,
isPublishSidebarOpened,
showIconLabels,
hasFixedToolbar,
+ hasBlockSelection,
isNestedEntity,
- postType,
} = useSelect( ( select ) => {
const { get: getPreference } = select( preferencesStore );
const {
@@ -73,6 +75,8 @@ function Header( {
isPublishSidebarOpened: _isPublishSidebarOpened(),
showIconLabels: getPreference( 'core', 'showIconLabels' ),
hasFixedToolbar: getPreference( 'core', 'fixedToolbar' ),
+ hasBlockSelection:
+ !! select( blockEditorStore ).getBlockSelectionStart(),
isNestedEntity:
!! getEditorSettings().onNavigateToPreviousEntityRecord,
};
@@ -85,7 +89,9 @@ function Header( {
const [ isBlockToolsCollapsed, setIsBlockToolsCollapsed ] =
useState( true );
- const hasCenter = isBlockToolsCollapsed && ! isTooNarrowForDocumentBar;
+ const hasCenter =
+ ( ! hasBlockSelection || isBlockToolsCollapsed ) &&
+ ! isTooNarrowForDocumentBar;
const hasBackButton = useHasBackButton();
/*
* The edit-post-header classname is only kept for backward compatability
diff --git a/packages/editor/src/components/post-template/classic-theme.js b/packages/editor/src/components/post-template/classic-theme.js
index 8127a18909f5cc..4a65a9b4c75636 100644
--- a/packages/editor/src/components/post-template/classic-theme.js
+++ b/packages/editor/src/components/post-template/classic-theme.js
@@ -177,8 +177,7 @@ function PostTemplateDropdownContent( { onClose } ) {
{ canEdit && onNavigateToEntityRecord && (