[wp-trac] [WordPress Trac] #41158: Increase tinymce panel z-index
WordPress Trac
noreply at wordpress.org
Sun Jul 2 06:37:44 UTC 2017
#41158: Increase tinymce panel z-index
-----------------------------------+-------------------------
Reporter: greuben | Owner: azaozz
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 4.8.1
Component: Customize | Version: 4.8
Severity: normal | Resolution:
Keywords: has-patch fixed-major | Focuses: javascript
-----------------------------------+-------------------------
Comment (by westonruter):
Replying to [comment:6 azaozz]:
> Then again, if the editor is used somewhere else, the z-index will be
set when the Text widget initializes. It sets the z-index "globally" in
`tinymce`, not a per-instance thing.
If a Text widget is never opened, however, then this z-index logic is not
called, since no Text widget control is instantiated.
> Sure, what would be a "convenient" location for this in the Customizer?
Good question. I think @greuben's solution would work, but I don't think
it should go inside of `wp.editor.getDefaultSettings`, as adding side-
effects to that function doesn't seem the best. An alternative would be
using `wp_add_inline_script()` as seen in [attachment:41158.2.diff]. Or as
well, that JS logic that is embedded in PHP could just as well be added to
`customize-controls.js` like so:
{{{#!diff
--- src/wp-admin/js/customize-controls.js
+++ src/wp-admin/js/customize-controls.js
@@ -5507,6 +5507,13 @@
} );
} ());
+ // Make sure TinyMCE dialogs appear above Customizer UI.
+ $( document ).on( "wp-before-tinymce-init", function() {
+ if ( ! tinymce.ui.FloatPanel.zIndex ||
tinymce.ui.FloatPanel.zIndex < 500001 ) {
+ tinymce.ui.FloatPanel.zIndex = 500001;
+ }
+ } );
+
api.trigger( 'ready' );
});
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41158#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list