diff --git a/packages/block-editor/src/components/block-breadcrumb/index.js b/packages/block-editor/src/components/block-breadcrumb/index.js index 70f038181237b4..b3f2d3dee12013 100644 --- a/packages/block-editor/src/components/block-breadcrumb/index.js +++ b/packages/block-editor/src/components/block-breadcrumb/index.js @@ -74,7 +74,7 @@ function BlockBreadcrumb( { rootLabelText } ) { clearSelectedBlock(); - getEditorRegion( blockEditor ).focus(); + getEditorRegion( blockEditor )?.focus(); } } > { rootLabel } diff --git a/packages/block-editor/src/components/block-tools/index.js b/packages/block-editor/src/components/block-tools/index.js index 5cde3cccaf57e5..5e5f9190a0ebda 100644 --- a/packages/block-editor/src/components/block-tools/index.js +++ b/packages/block-editor/src/components/block-tools/index.js @@ -162,7 +162,7 @@ export default function BlockTools( { ) { event.preventDefault(); clearSelectedBlock(); - getEditorRegion( __unstableContentRef.current ).focus(); + getEditorRegion( __unstableContentRef.current )?.focus(); } } else if ( isMatch( 'core/block-editor/collapse-list-view', event ) ) { // If focus is currently within a text field, such as a rich text block or other editable field,