From fd3944b0d86e12963dcd3190e5d05923b29b372d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ella=20van=C2=A0Durpe?= Date: Fri, 25 Nov 2022 14:11:07 +0100 Subject: [PATCH] Add comment --- packages/block-editor/src/components/block-list/block.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/block-editor/src/components/block-list/block.js b/packages/block-editor/src/components/block-list/block.js index 517be2941570ed..70456ac213fc3b 100644 --- a/packages/block-editor/src/components/block-list/block.js +++ b/packages/block-editor/src/components/block-list/block.js @@ -354,6 +354,15 @@ const applyWithDispatch = withDispatch( ( dispatch, ownProps, registry ) => { canInsertBlockType, } = registry.select( blockEditorStore ); + /** + * Moves the block with clientId up one level. If the block type + * cannot be inserted at the new location, it will be attempted to + * convert to the default block type. + * + * @param {string} _clientId The block to move. + * @param {boolean} changeSelection Whether to change the selection + * to the moved block. + */ function moveFirstItemUp( _clientId, changeSelection = true ) { const targetRootClientId = getBlockRootClientId( _clientId ); const blockOrder = getBlockOrder( _clientId );