Skip to content

Commit

Permalink
Fix moving animation for nested blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed May 19, 2021
1 parent 76d2e69 commit 282389b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export function useBlockProps( props = {}, { __unstableIsHtml } = {} ) {
} = useSelect(
( select ) => {
const {
getBlockRootClientId,
getBlockIndex,
getBlockMode,
getBlockName,
Expand All @@ -87,8 +88,9 @@ export function useBlockProps( props = {}, { __unstableIsHtml } = {} ) {
isBlockMultiSelected( clientId ) ||
isAncestorMultiSelected( clientId );
const blockName = getBlockName( clientId );
const rootClientId = getBlockRootClientId( clientId );
return {
index: getBlockIndex( clientId ),
index: getBlockIndex( clientId, rootClientId ),
mode: getBlockMode( clientId ),
name: blockName,
blockTitle: getBlockType( blockName ).title,
Expand Down

0 comments on commit 282389b

Please sign in to comment.