Skip to content

Commit

Permalink
Fix scroll on moving blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Oct 31, 2017
1 parent 29b04a0 commit b57b907
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion editor/modes/visual-editor/block-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class VisualEditorBlockList extends Component {
if ( nextProps.multiSelectedBlockUids && nextProps.multiSelectedBlockUids.length > 0 ) {
const extent = this.nodes[ nextProps.selectionEnd ];
if ( extent ) {
scrollIntoView( extent, extent.closest( '.editor-layout__editor' ), {
scrollIntoView( extent, extent.closest( '.editor-layout__content' ), {
onlyScrollIfNeeded: true,
} );
}
Expand Down
2 changes: 1 addition & 1 deletion editor/modes/visual-editor/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class VisualEditorBlock extends Component {
}

// Not Ideal, but it's the easiest way to get the scrollable container
this.editorLayout = document.querySelector( '.editor-layout__editor' );
this.editorLayout = document.querySelector( '.editor-layout__content' );
}

componentWillReceiveProps( newProps ) {
Expand Down

0 comments on commit b57b907

Please sign in to comment.