Skip to content

Commit

Permalink
Block Editor: Don't hide the toolbar for an empty default block in HT…
Browse files Browse the repository at this point in the history
…ML mode (#64374)


Unlinked contributors: designsimply.

Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Co-authored-by: stokesman <presstoke@git.wordpress.org>
Co-authored-by: Thelmachido <thelmachido@git.wordpress.org>
Co-authored-by: mboynes <mboynes@git.wordpress.org>
  • Loading branch information
5 people authored Aug 8, 2024
1 parent c48075b commit 88127e2
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export function useShowBlockTools() {
getSelectedBlockClientId,
getFirstMultiSelectedBlockClientId,
getBlock,
getBlockMode,
getSettings,
hasMultiSelection,
__unstableGetEditorMode,
Expand All @@ -33,7 +34,9 @@ export function useShowBlockTools() {
const editorMode = __unstableGetEditorMode();
const hasSelectedBlock = !! clientId && !! block;
const isEmptyDefaultBlock =
hasSelectedBlock && isUnmodifiedDefaultBlock( block );
hasSelectedBlock &&
isUnmodifiedDefaultBlock( block ) &&
getBlockMode( clientId ) !== 'html';
const _showEmptyBlockSideInserter =
clientId &&
! isTyping() &&
Expand Down

0 comments on commit 88127e2

Please sign in to comment.