Skip to content

Commit

Permalink
Merge pull request #191 from wordpress-mobile/issue/190-problem-with-…
Browse files Browse the repository at this point in the history
…focus

Tapping twice no longer removes focus.
  • Loading branch information
diegoreymendez authored Oct 24, 2018
2 parents fc5bb1b + 3d7c8d5 commit fef091e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/store/reducers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,13 @@ export const reducer = (
}
case ActionTypes.BLOCK.FOCUS: {
const destBlock = findBlock( blocks, action.clientId );
const destBlockState = destBlock.focused;

// Deselect all blocks
for ( const block of blocks ) {
block.focused = false;
}

// Select or deselect pressed block
destBlock.focused = ! destBlockState;
destBlock.focused = true;
return { blocks: blocks, refresh: ! state.refresh };
}
case ActionTypes.BLOCK.MOVE_UP: {
Expand Down

0 comments on commit fef091e

Please sign in to comment.