Skip to content

Commit

Permalink
Fix condition
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Nov 27, 2024
1 parent e833472 commit 3fb856b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/block-editor/src/components/block-toolbar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export function PrivateBlockToolbar( {
showLockButtons,
showSwitchSectionStyleButton,
hasFixedToolbar,
isNavigationMode,
} = useSelect( ( select ) => {
const {
getBlockName,
Expand All @@ -89,6 +90,7 @@ export function PrivateBlockToolbar( {
getSettings,
getParentSectionBlock,
isZoomOut,
isNavigationMode: _isNavigationMode,
} = unlock( select( blockEditorStore ) );
const selectedBlockClientIds = getSelectedBlockClientIds();
const selectedBlockClientId = selectedBlockClientIds[ 0 ];
Expand Down Expand Up @@ -148,6 +150,7 @@ export function PrivateBlockToolbar( {
showLockButtons: ! isZoomOut(),
showSwitchSectionStyleButton: isZoomOut(),
hasFixedToolbar: getSettings().hasFixedToolbar,
isNavigationMode: _isNavigationMode(),
};
}, [] );

Expand All @@ -174,13 +177,12 @@ export function PrivateBlockToolbar( {
// Shifts the toolbar to make room for the parent block selector.
const classes = clsx( 'block-editor-block-contextual-toolbar', {
'has-parent': showParentSelector,
'is-inverted-toolbar': ! isDefaultEditingMode && ! hasFixedToolbar,
'is-inverted-toolbar': isNavigationMode && ! hasFixedToolbar,
} );

const innerClasses = clsx( 'block-editor-block-toolbar', {
'is-synced': isSynced,
'is-connected': isUsingBindings,
'is-dark-toolbar': ! isDefaultEditingMode && ! hasFixedToolbar,
} );

return (
Expand Down

0 comments on commit 3fb856b

Please sign in to comment.