Editor scrolling: on setcontent, resize the editor after some delay to allow the browser to render the content. Props avryl, see #28328.

git-svn-id: https://develop.svn.wordpress.org/trunk@29185 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2014-07-16 02:29:53 +00:00
parent a90e8c6ff2
commit 850d8eb69e

View File

@ -140,9 +140,13 @@ tinymce.PluginManager.add( 'wpautoresize', function( editor ) {
editor.on( 'init', function() {
editor.dom.addClass( editor.getBody(), 'wp-autoresize' );
});
editor.on( 'nodechange setcontent keyup FullscreenStateChanged', resize );
editor.on( 'nodechange keyup FullscreenStateChanged', resize );
editor.on( 'setcontent', function() {
wait( 3, 100 );
});
if ( editor.getParam( 'autoresize_on_init', true ) ) {
editor.on( 'init', function() {
// Hit it 20 times in 100 ms intervals