diff --git src/wp-admin/js/widgets/text-widgets.js src/wp-admin/js/widgets/text-widgets.js
index dfd2a88fc1..7932606e3d 100644
--- src/wp-admin/js/widgets/text-widgets.js
+++ src/wp-admin/js/widgets/text-widgets.js
@@ -130,9 +130,6 @@ wp.textWidgets = ( function( $ ) {
 					wp.editor.remove( id );
 				}
 
-				// Adjust z-index for the customizer.
-				window.tinymce.ui.FloatPanel.zIndex = 500001;
-
 				wp.editor.initialize( id, {
 					tinymce: {
 						wpautop: true
diff --git src/wp-includes/class-wp-customize-manager.php src/wp-includes/class-wp-customize-manager.php
index 62d587bf6a..8c9cf93f9f 100644
--- src/wp-includes/class-wp-customize-manager.php
+++ src/wp-includes/class-wp-customize-manager.php
@@ -3338,6 +3338,8 @@ final class WP_Customize_Manager {
 	 * @since 3.4.0
 	 */
 	public function enqueue_control_scripts() {
+		wp_add_inline_script( 'editor', 'jQuery( document ).one( "wp-before-tinymce-init", function() { if ( ! tinymce.ui.FloatPanel.zIndex || tinymce.ui.FloatPanel.zIndex < 500001 ) { tinymce.ui.FloatPanel.zIndex = 500001; } } );' );
+
 		foreach ( $this->controls as $control ) {
 			$control->enqueue();
 		}
