File Editor: Prevent the scrolling of current-file into view to also change initially-focused element in Chrome.

Props afercia.
Fixes #24048.

Built from https://develop.svn.wordpress.org/trunk@41864


git-svn-id: http://core.svn.wordpress.org/trunk@41698 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Weston Ruter 2017-10-15 05:37:51 +00:00
parent 8562e4bfac
commit 191beede5e
3 changed files with 8 additions and 4 deletions

View File

@ -376,8 +376,12 @@ wp.themePluginEditor = (function( $ ) {
} );
// Scroll the current file into view.
$templateside.find( '.current-file' ).each( function() {
this.scrollIntoView( false );
$templateside.find( '.current-file:first' ).each( function() {
if ( this.scrollIntoViewIfNeeded ) {
this.scrollIntoViewIfNeeded();
} else {
this.scrollIntoView( false );
}
} );
};

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.9-beta2-41863';
$wp_version = '4.9-beta2-41864';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.