From b57b9077a5b95a6c475f92fe7c848471cc2ea360 Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Tue, 31 Oct 2017 17:34:19 +0100 Subject: [PATCH] Fix scroll on moving blocks --- editor/modes/visual-editor/block-list.js | 2 +- editor/modes/visual-editor/block.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/editor/modes/visual-editor/block-list.js b/editor/modes/visual-editor/block-list.js index 4e2d63d18f04a4..dbab75312d92d5 100644 --- a/editor/modes/visual-editor/block-list.js +++ b/editor/modes/visual-editor/block-list.js @@ -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, } ); } diff --git a/editor/modes/visual-editor/block.js b/editor/modes/visual-editor/block.js index 588f8504f6ac43..5295121e6679b5 100644 --- a/editor/modes/visual-editor/block.js +++ b/editor/modes/visual-editor/block.js @@ -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 ) {