Skip to content

Commit 0cef3d4

Browse files
committed
Try breaking DisableNonPageContentBlocks into separate useEffect calls
1 parent 82c2671 commit 0cef3d4

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

packages/editor/src/components/provider/disable-non-page-content-blocks.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,6 @@ export default function DisableNonPageContentBlocks() {
8484
setBlockEditingMode( clientId, 'contentOnly' );
8585
}
8686
}
87-
for ( const clientId of disabledIds ) {
88-
setBlockEditingMode( clientId, 'disabled' );
89-
}
9087
} );
9188

9289
return () => {
@@ -98,7 +95,7 @@ export default function DisableNonPageContentBlocks() {
9895
}
9996
} );
10097
};
101-
}, [ templateParts, isNavigationMode, registry, disabledIds ] );
98+
}, [ templateParts, isNavigationMode, registry ] );
10299

103100
useEffect( () => {
104101
const { setBlockEditingMode, unsetBlockEditingMode } =

0 commit comments

Comments
 (0)