From 0cef3d4ed56c279b5c6f9be0dbb46d531a137993 Mon Sep 17 00:00:00 2001 From: Daniel Richards Date: Wed, 11 Dec 2024 16:09:53 +0800 Subject: [PATCH] Try breaking DisableNonPageContentBlocks into separate useEffect calls --- .../components/provider/disable-non-page-content-blocks.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/editor/src/components/provider/disable-non-page-content-blocks.js b/packages/editor/src/components/provider/disable-non-page-content-blocks.js index 95295574c56a86..ffbf1ac0625463 100644 --- a/packages/editor/src/components/provider/disable-non-page-content-blocks.js +++ b/packages/editor/src/components/provider/disable-non-page-content-blocks.js @@ -84,9 +84,6 @@ export default function DisableNonPageContentBlocks() { setBlockEditingMode( clientId, 'contentOnly' ); } } - for ( const clientId of disabledIds ) { - setBlockEditingMode( clientId, 'disabled' ); - } } ); return () => { @@ -98,7 +95,7 @@ export default function DisableNonPageContentBlocks() { } } ); }; - }, [ templateParts, isNavigationMode, registry, disabledIds ] ); + }, [ templateParts, isNavigationMode, registry ] ); useEffect( () => { const { setBlockEditingMode, unsetBlockEditingMode } =