Skip to content

Commit

Permalink
Fix writing flow after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed May 29, 2018
1 parent 40d1191 commit 0793684
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion editor/components/writing-flow/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0793684

Please sign in to comment.