diff --git a/packages/block-editor/src/components/inserter/block-patterns-explorer/index.js b/packages/block-editor/src/components/inserter/block-patterns-explorer/index.js index 82e8a4435b032..bd4bccffd4e81 100644 --- a/packages/block-editor/src/components/inserter/block-patterns-explorer/index.js +++ b/packages/block-editor/src/components/inserter/block-patterns-explorer/index.js @@ -41,6 +41,7 @@ function PatternsExplorer( { initialCategory, rootClientId } ) { selectedCategory={ selectedCategory } patternCategories={ patternCategories } patternSourceFilter={ patternSourceFilter } + rootClientId={ rootClientId } /> ); diff --git a/packages/block-editor/src/components/inserter/block-patterns-explorer/pattern-list.js b/packages/block-editor/src/components/inserter/block-patterns-explorer/pattern-list.js index 217f3f21b573d..a5e43c2c6bf87 100644 --- a/packages/block-editor/src/components/inserter/block-patterns-explorer/pattern-list.js +++ b/packages/block-editor/src/components/inserter/block-patterns-explorer/pattern-list.js @@ -47,10 +47,16 @@ function PatternsListHeader( { filterValue, filteredBlockPatternsLength } ) { ); } -function PatternList( { searchValue, selectedCategory, patternCategories } ) { +function PatternList( { + searchValue, + selectedCategory, + patternCategories, + rootClientId, +} ) { const container = useRef(); const debouncedSpeak = useDebounce( speak, 500 ); const [ destinationRootClientId, onInsertBlocks ] = useInsertionPoint( { + rootClientId, shouldFocusBlock: true, } ); const [ patterns, , onClickPattern ] = usePatternsState(