TinyMCE: fix "flickering inline toolbar" in Chrome in RTL mode by not showing tooltips while an inline toolbar is shown.
Fixes #42018. git-svn-id: https://develop.svn.wordpress.org/trunk@41643 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
e549a6c53c
commit
1d022678bb
@ -762,6 +762,11 @@ div.mce-menu .mce-menu-item-sep,
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
/* Don't show the tooltip. Used in Chrome RTL, see #42018 */
|
||||
.rtl .mce-tooltip.wp-hide-mce-tooltip {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.mce-tooltip-inner {
|
||||
border-radius: 3px;
|
||||
box-shadow: 0 3px 5px rgba( 0, 0, 0, 0.2 );
|
||||
|
@ -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 ) {
|
||||
|
Loading…
Reference in New Issue
Block a user