TinyMCE: fix "flickering inline toolbar" in Chrome in RTL mode by not showing tooltips while an inline toolbar is shown.

Fixes #42018.
Built from https://develop.svn.wordpress.org/trunk@41643


git-svn-id: http://core.svn.wordpress.org/trunk@41477 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz
2017-09-29 14:25:47 +00:00
parent 79ffa7ff2a
commit 8fc05d8fba
8 changed files with 26 additions and 5 deletions

View File

@@ -685,7 +685,8 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
mceIframe = document.getElementById( editor.id + '_ifr' ),
mceToolbar,
mceStatusbar,
wpStatusbar;
wpStatusbar,
isChromeRtl = ( editor.rtl && /Chrome/.test( navigator.userAgent ) );
if ( container ) {
mceToolbar = tinymce.$( '.mce-toolbar-grp', container )[0];
@@ -929,6 +930,16 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
toolbar.on( 'show', function() {
this.reposition();
if ( isChromeRtl ) {
tinymce.$( '.mce-widget.mce-tooltip' ).addClass( 'wp-hide-mce-tooltip' );
}
} );
toolbar.on( 'hide', function() {
if ( isChromeRtl ) {
tinymce.$( '.mce-widget.mce-tooltip' ).removeClass( 'wp-hide-mce-tooltip' );
}
} );
toolbar.on( 'keydown', function( event ) {

File diff suppressed because one or more lines are too long