Skip to content
Prev Previous commit
Keep scroll position when moving the selected blocks
  • Loading branch information
ellatrix committed May 30, 2017
commit 6ef9c81e2187230be3970367ec4d5dfaf9713f93
4 changes: 2 additions & 2 deletions editor/modes/visual-editor/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ class VisualEditorBlock extends wp.element.Component {
componentWillReceiveProps( newProps ) {
if (
this.props.order !== newProps.order &&
this.props.isSelected &&
newProps.isSelected
( ( this.props.isSelected && newProps.isSelected ) ||
( this.props.isFirstSelected && newProps.isFirstSelected ) )
) {
this.previousOffset = this.node.getBoundingClientRect().top;
}
Expand Down