TinyMCE: fix automatic scroll on page load.
Set focus when new content is loaded in the editor, but not when it's the initial load. Fixes #38511. git-svn-id: https://develop.svn.wordpress.org/trunk@39299 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
96dba32dfb
commit
1e4c6afab3
|
@ -92,10 +92,13 @@
|
|||
} );
|
||||
|
||||
// Replace any new markers nodes with views.
|
||||
editor.on( 'setcontent', function() {
|
||||
// Make sure that the editor is focussed.
|
||||
// May refresh the content internally which resets the iframes.
|
||||
editor.focus();
|
||||
editor.on( 'setcontent', function( event ) {
|
||||
if ( event.load && ! event.initial ) {
|
||||
// Make sure that the editor is focussed.
|
||||
// May refresh the content internally which resets the iframes.
|
||||
editor.focus();
|
||||
}
|
||||
|
||||
wp.mce.views.render();
|
||||
} );
|
||||
|
||||
|
|
Loading…
Reference in New Issue