Skip to content

Commit

Permalink
fix: Makes the edit mode persistent in top toolbar mode. (WordPress#6…
Browse files Browse the repository at this point in the history
…5511)

Co-authored-by: vipul0425 <vipulgupta003@git.wordpress.org>
Co-authored-by: youknowriad <youknowriad@git.wordpress.org>
Co-authored-by: jameskoster <jameskoster@git.wordpress.org>
Co-authored-by: andrewserong <andrewserong@git.wordpress.org>
  • Loading branch information
5 people committed Sep 20, 2024
1 parent eaf2258 commit 8e79558
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions packages/editor/src/components/document-tools/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,8 @@ function DocumentTools( { className, disableBlockTools = false } ) {
listViewShortcut,
inserterSidebarToggleRef,
listViewToggleRef,
hasFixedToolbar,
showIconLabels,
} = useSelect( ( select ) => {
const { getSettings } = select( blockEditorStore );
const { get } = select( preferencesStore );
const {
isListViewOpened,
Expand All @@ -60,7 +58,6 @@ function DocumentTools( { className, disableBlockTools = false } ) {
),
inserterSidebarToggleRef: getInserterSidebarToggleRef(),
listViewToggleRef: getListViewToggleRef(),
hasFixedToolbar: getSettings().hasFixedToolbar,
showIconLabels: get( 'core', 'showIconLabels' ),
isDistractionFree: get( 'core', 'distractionFree' ),
isVisualMode: getEditorMode() === 'visual',
Expand Down Expand Up @@ -137,7 +134,7 @@ function DocumentTools( { className, disableBlockTools = false } ) {
) }
{ ( isWideViewport || ! showIconLabels ) && (
<>
{ isLargeViewport && ! hasFixedToolbar && (
{ isLargeViewport && (
<ToolbarItem
as={ ToolSelector }
showTooltip={ ! showIconLabels }
Expand Down

0 comments on commit 8e79558

Please sign in to comment.