diff --git a/packages/block-editor/src/store/private-selectors.js b/packages/block-editor/src/store/private-selectors.js index d8955bd6342c4..9e99176819ae8 100644 --- a/packages/block-editor/src/store/private-selectors.js +++ b/packages/block-editor/src/store/private-selectors.js @@ -116,6 +116,7 @@ export const getEnabledClientIdsTree = createSelector( state.settings.templateLock, state.blockListSettings, state.editorMode, + getSectionRootClientId( state ), ] ); diff --git a/packages/block-editor/src/store/utils.js b/packages/block-editor/src/store/utils.js index af991608238e2..79e15255e6cc1 100644 --- a/packages/block-editor/src/store/utils.js +++ b/packages/block-editor/src/store/utils.js @@ -10,6 +10,7 @@ import { parse as grammarParse } from '@wordpress/block-serialization-default-pa import { selectBlockPatternsKey } from './private-keys'; import { unlock } from '../lock-unlock'; import { STORE_NAME } from './constants'; +import { getSectionRootClientId } from './private-selectors'; export const withRootClientIdOptionKey = Symbol( 'withRootClientId' ); @@ -118,5 +119,6 @@ export function getInsertBlockTypeDependants( state, rootClientId ) { state.settings.templateLock, state.blockEditingModes, state.editorMode, + getSectionRootClientId( state ), ]; }