From 0793684b06bde52f82d01170e913c8a4a6cc9f91 Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Tue, 29 May 2018 10:14:03 +0100 Subject: [PATCH] Fix writing flow after rebase --- editor/components/writing-flow/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/editor/components/writing-flow/index.js b/editor/components/writing-flow/index.js index 78e33e7a0729fa..57a8dc4bbf6430 100644 --- a/editor/components/writing-flow/index.js +++ b/editor/components/writing-flow/index.js @@ -224,7 +224,10 @@ class WritingFlow extends Component { if ( ( navigateDown && nextBlockUid ) || ( navigateUp && previousBlockUid ) ) { event.preventDefault(); - this.moveSelection( navigateUp ); + const focusedBlockUid = navigateUp ? previousBlockUid : nextBlockUid; + if ( focusedBlockUid ) { + this.props.onSelectBlock( focusedBlockUid ); + } } // Special case when reaching the end of the blocks (navigate to the next tabbable outside of the writing flow)