diff --git a/packages/block-library/src/block/edit.js b/packages/block-library/src/block/edit.js index 3d4d07e52b386a..c4c58f9df6a870 100644 --- a/packages/block-library/src/block/edit.js +++ b/packages/block-library/src/block/edit.js @@ -111,19 +111,24 @@ function ReusableBlockControl( { handleEditOriginal, resetContent, } ) { - const canUserEdit = useSelect( - ( select ) => - !! select( coreStore ).canUser( 'update', { - kind: 'postType', - name: 'wp_block', - id: recordId, - } ), + const { canUserEdit, isNavigationMode } = useSelect( + ( select ) => { + const { canUser } = select( coreStore ); + return { + canUserEdit: !! canUser( 'update', { + kind: 'postType', + name: 'wp_block', + id: recordId, + } ), + isNavigationMode: select( blockEditorStore ).isNavigationMode(), + }; + }, [ recordId ] ); return ( <> - { canUserEdit && !! handleEditOriginal && ( + { canUserEdit && ! isNavigationMode && !! handleEditOriginal && ( diff --git a/packages/block-library/src/template-part/edit/index.js b/packages/block-library/src/template-part/edit/index.js index ba66ffa673ff87..016145da5ce6b0 100644 --- a/packages/block-library/src/template-part/edit/index.js +++ b/packages/block-library/src/template-part/edit/index.js @@ -126,11 +126,16 @@ export default function TemplatePartEdit( { onNavigateToEntityRecord, title, canUserEdit, + isNavigationMode, } = useSelect( ( select ) => { const { getEditedEntityRecord, hasFinishedResolution } = select( coreStore ); - const { getBlockCount, getSettings } = select( blockEditorStore ); + const { + getBlockCount, + getSettings, + isNavigationMode: _isNavigationMode, + } = select( blockEditorStore ); const getEntityArgs = [ 'postType', @@ -168,6 +173,7 @@ export default function TemplatePartEdit( { getSettings().onNavigateToEntityRecord, title: entityRecord?.title, canUserEdit: !! _canUserEdit, + isNavigationMode: _isNavigationMode(), }; }, [ templatePartId, attributes.area, clientId ] @@ -236,6 +242,7 @@ export default function TemplatePartEdit( { <> { isEntityAvailable && + ! isNavigationMode && onNavigateToEntityRecord && canUserEdit && (