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

@ -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 );

File diff suppressed because one or more lines are too long

View File

@ -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 );

File diff suppressed because one or more lines are too long

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

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.9-alpha-41642';
$wp_version = '4.9-alpha-41643';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.