diff --git a/editor/components/block-controls/multi-block-controls.js b/editor/components/block-controls/multi-block-controls.js index 13ca6b4ccd6887..b2b1b8e46d04ab 100644 --- a/editor/components/block-controls/multi-block-controls.js +++ b/editor/components/block-controls/multi-block-controls.js @@ -74,7 +74,7 @@ export const withMultiBlockSupport = ( component, attributeName ) => createHighe [ attributeName ]: newValue, }; for ( let i = 0; i < props.multiSelectedBlocks.length; i++ ) { - newProps.onMultiBlockChange( props.multiSelectedBlocks[ i ].uid, newAttributes ); + newProps.onMultiBlockChange( props.multiSelectedBlocks[ i ].clientId, newAttributes ); } }; } diff --git a/editor/components/block-edit/context.js b/editor/components/block-edit/context.js index 4ef2ea5626b8ad..362c897c89a3b8 100644 --- a/editor/components/block-edit/context.js +++ b/editor/components/block-edit/context.js @@ -75,7 +75,7 @@ const isFirstOrOnlyBlockSelectedHOC = createHigherOrderComponent( ( OriginalComp return ( props ) => { return ( <Consumer> - { ( { isSelected, uid } ) => ( isSelected || ( uid === props.firstMultiSelectedBlockUid && props.allSelectedBlocksOfSameType ) ) && ( + { ( { isSelected, clientId } ) => ( isSelected || ( clientId === props.getFirstMultiSelectedBlockClientId && props.allSelectedBlocksOfSameType ) ) && ( <OriginalComponent { ...props } /> ) } </Consumer> @@ -88,12 +88,12 @@ export const isFirstOrOnlyBlockSelected = ( component ) => { withSelect( ( select ) => { const { getMultiSelectedBlocks, - getFirstMultiSelectedBlockUid, + getFirstMultiSelectedBlockClientId, isMultiSelecting, } = select( 'core/editor' ); const allSelectedBlocksOfSameType = uniq( getMultiSelectedBlocks().map( ( { name } ) => name ) ).length === 1; return { - firstMultiSelectedBlockUid: getFirstMultiSelectedBlockUid(), + getFirstMultiSelectedBlockClientId: getFirstMultiSelectedBlockClientId(), isSelecting: isMultiSelecting(), selectedBlocks: getMultiSelectedBlocks(), allSelectedBlocksOfSameType,