File Editor: Prevent the scrolling of current-file into view to also change initially-focused element in Chrome.
Props afercia. Fixes #24048. git-svn-id: https://develop.svn.wordpress.org/trunk@41864 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
c8889350e7
commit
93bb527725
@ -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 );
|
||||
}
|
||||
} );
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user