diff --git a/packages/block-library/src/list-item/hooks/use-indent-list-item.js b/packages/block-library/src/list-item/hooks/use-indent-list-item.js index 6eb5d9d73ba65..2cd62d201d61f 100644 --- a/packages/block-library/src/list-item/hooks/use-indent-list-item.js +++ b/packages/block-library/src/list-item/hooks/use-indent-list-item.js @@ -61,5 +61,7 @@ export default function useIndentListItem( clientId ) { clonedBlocks[ clonedBlocks.length - 1 ].clientId ); } + + return true; }, [ clientId ] ); } diff --git a/packages/block-library/src/list-item/hooks/use-outdent-list-item.js b/packages/block-library/src/list-item/hooks/use-outdent-list-item.js index 85c433fbeffad..a17890eada6c5 100644 --- a/packages/block-library/src/list-item/hooks/use-outdent-list-item.js +++ b/packages/block-library/src/list-item/hooks/use-outdent-list-item.js @@ -93,5 +93,7 @@ export default function useOutdentListItem() { removeBlock( parentListId, shouldSelectParent ); } } ); + + return true; }, [] ); } diff --git a/packages/block-library/src/list-item/hooks/use-space.js b/packages/block-library/src/list-item/hooks/use-space.js index e61c9c063b88f..ee4d8bdbf8786 100644 --- a/packages/block-library/src/list-item/hooks/use-space.js +++ b/packages/block-library/src/list-item/hooks/use-space.js @@ -40,14 +40,17 @@ export default function useSpace( clientId ) { selectionStart.offset === 0 && selectionEnd.offset === 0 ) { - event.preventDefault(); if ( shiftKey ) { // Note that backspace behaviour in defined in onMerge. if ( keyCode === TAB ) { - outdentListItem(); + if ( outdentListItem() ) { + event.preventDefault(); + } } } else if ( getBlockIndex( clientId ) !== 0 ) { - indentListItem(); + if ( indentListItem() ) { + event.preventDefault(); + } } } }