Skip to content

Commit

Permalink
Allow inserting blocks within the sections root container in navigati…
Browse files Browse the repository at this point in the history
…on mode
  • Loading branch information
youknowriad committed Sep 18, 2024
1 parent d031611 commit 0475922
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/block-editor/src/store/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -2964,13 +2964,19 @@ export const getBlockEditingMode = createRegistrySelector(
if ( ! clientId ) {
return 'default';
}
const rootClientId = getBlockRootClientId( state, clientId );
const templateLock = getTemplateLock( state, rootClientId );
const sectionRootClientId = getSectionRootClientId( state );
if (
editorMode === 'navigation' &&
clientId === sectionRootClientId
) {
return 'default';
}
const sectionsClientIds = getBlockOrder(
state,
sectionRootClientId
);
const rootClientId = getBlockRootClientId( state, clientId );
const templateLock = getTemplateLock( state, rootClientId );
if (
templateLock === 'contentOnly' ||
editorMode === 'navigation'
Expand Down

0 comments on commit 0475922

Please sign in to comment.