diff --git a/wp-includes/class-wp-editor.php b/wp-includes/class-wp-editor.php index 914613508e..61cda16585 100644 --- a/wp-includes/class-wp-editor.php +++ b/wp-includes/class-wp-editor.php @@ -1663,7 +1663,8 @@ final class _WP_Editors { ?> ( function() { - var initialize = function() { + var initialized = []; + var initialize = function() { var init, id, inPostbox, $wrap; var readyState = document.readyState; @@ -1672,6 +1673,10 @@ final class _WP_Editors { } for ( id in tinyMCEPreInit.mceInit ) { + if ( initialized.indexOf( id ) > -1 ) { + continue; + } + init = tinyMCEPreInit.mceInit[id]; $wrap = tinymce.$( '#wp-' + id + '-wrap' ); inPostbox = $wrap.parents( '.postbox' ).length > 0; @@ -1679,9 +1684,10 @@ final class _WP_Editors { if ( ! init.wp_skip_init && ( $wrap.hasClass( 'tmce-active' ) || ! tinyMCEPreInit.qtInit.hasOwnProperty( id ) ) && - ( ( inPostbox && readyState === 'complete' ) || ( ! inPostbox && readyState === 'interactive' ) ) + ( readyState === 'complete' || ( ! inPostbox && readyState === 'interactive' ) ) ) { tinymce.init( init ); + initialized.push( id ); if ( ! window.wpActiveEditor ) { window.wpActiveEditor = id; diff --git a/wp-includes/version.php b/wp-includes/version.php index 059ffbdf1e..e276b9cc03 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.9-alpha-51401'; +$wp_version = '5.9-alpha-51402'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.