From b4c90182ca1e3c9d666e1b155a630cffa86db895 Mon Sep 17 00:00:00 2001 From: Daniel Richards Date: Tue, 14 Aug 2018 15:16:59 +0800 Subject: [PATCH] Remove duplicate selectBlock dispatch - See REMOVE_BLOCKS effect in editor store's effect.js file. Final action when removing blocks is to handle selection of the previous block --- packages/editor/src/components/block-list/block.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/editor/src/components/block-list/block.js b/packages/editor/src/components/block-list/block.js index 9c38b2be13eca2..b10406c7c83416 100644 --- a/packages/editor/src/components/block-list/block.js +++ b/packages/editor/src/components/block-list/block.js @@ -324,12 +324,8 @@ export class BlockListBlock extends Component { case BACKSPACE: case DELETE: // Remove block on backspace. - const { clientId, onRemove, previousBlockClientId, onSelect } = this.props; + const { clientId, onRemove } = this.props; onRemove( clientId ); - - if ( previousBlockClientId ) { - onSelect( previousBlockClientId, -1 ); - } event.preventDefault(); break; }