Skip to content

Commit

Permalink
Block List: Fix select previous on backspace behavior
Browse files Browse the repository at this point in the history
Regression of #5025, where prop was changed from `previousBlock` to `previousBlockUid`, but neglected to update the instance of the prop reference in keydown handler
  • Loading branch information
aduth committed Mar 9, 2018
1 parent 6332d40 commit 9767af6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions editor/components/block-list/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -438,13 +438,13 @@ export class BlockListBlock extends Component {
case DELETE:
// Remove block on backspace.
if ( target === this.node ) {
const { uid, onRemove, isLocked, previousBlock, onSelect } = this.props;
const { uid, onRemove, isLocked, previousBlockUid, onSelect } = this.props;
event.preventDefault();
if ( ! isLocked ) {
onRemove( uid );

if ( previousBlock ) {
onSelect( previousBlock.uid, -1 );
if ( previousBlockUid ) {
onSelect( previousBlockUid, -1 );
}
}
}
Expand Down

0 comments on commit 9767af6

Please sign in to comment.