diff --git a/packages/block-editor/src/components/block-settings-menu/block-settings-dropdown.js b/packages/block-editor/src/components/block-settings-menu/block-settings-dropdown.js index 657d685b966e0..e74dcfe329e43 100644 --- a/packages/block-editor/src/components/block-settings-menu/block-settings-dropdown.js +++ b/packages/block-editor/src/components/block-settings-menu/block-settings-dropdown.js @@ -98,6 +98,7 @@ export function BlockSettingsDropdown( { parentBlockType, previousBlockClientId, selectedBlockClientIds, + openedBlockSettingsMenu, } = useSelect( ( select ) => { const { @@ -107,7 +108,8 @@ export function BlockSettingsDropdown( { getPreviousBlockClientId, getSelectedBlockClientIds, getBlockAttributes, - } = select( blockEditorStore ); + getOpenedBlockSettingsMenu, + } = unlock( select( blockEditorStore ) ); const { getActiveBlockVariation } = select( blocksStore ); @@ -129,6 +131,7 @@ export function BlockSettingsDropdown( { previousBlockClientId: getPreviousBlockClientId( firstBlockClientId ), selectedBlockClientIds: getSelectedBlockClientIds(), + openedBlockSettingsMenu: getOpenedBlockSettingsMenu(), }; }, [ firstBlockClientId ] @@ -136,12 +139,6 @@ export function BlockSettingsDropdown( { const { getBlockOrder, getSelectedBlockClientIds } = useSelect( blockEditorStore ); - const openedBlockSettingsMenu = useSelect( - ( select ) => - unlock( select( blockEditorStore ) ).getOpenedBlockSettingsMenu(), - [] - ); - const { setOpenedBlockSettingsMenu } = unlock( useDispatch( blockEditorStore ) );