diff --git i/src/wp-admin/js/widgets/text-widgets.js w/src/wp-admin/js/widgets/text-widgets.js
index dfd2a88fc1..7932606e3d 100644
--- i/src/wp-admin/js/widgets/text-widgets.js
+++ w/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 i/src/wp-includes/class-wp-editor.php w/src/wp-includes/class-wp-editor.php
index 86966d6f6b..153b976d90 100644
--- i/src/wp-includes/class-wp-editor.php
+++ w/src/wp-includes/class-wp-editor.php
@@ -864,6 +864,12 @@ final class _WP_Editors {
 		window.wp = window.wp || {};
 		window.wp.editor = window.wp.editor || {};
 		window.wp.editor.getDefaultSettings = function() {
+			<?php if ( is_customize_preview() ) : ?>
+			// Adjust z-index for the customizer.
+			if ( tinymce.ui.FloatPanel.zIndex < 500001 ) {
+				tinymce.ui.FloatPanel.zIndex = 500001;
+			}
+			<?php endif; ?>
 			return {
 				tinymce: <?php echo $settings; ?>,
 				quicktags: {
