Make WordPress Core

Changeset 41643


Ignore:
Timestamp:
09/29/2017 02:24:19 PM (7 years ago)
Author:
azaozz
Message:

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

Fixes #42018.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/css/editor.css

    r41062 r41643  
    761761.mce-tooltip {
    762762    margin-top: 2px;
     763}
     764
     765/* Don't show the tooltip. Used in Chrome RTL, see #42018 */
     766.rtl .mce-tooltip.wp-hide-mce-tooltip {
     767    display: none !important;
    763768}
    764769
  • trunk/src/wp-includes/js/tinymce/plugins/wordpress/plugin.js

    r40996 r41643  
    686686            mceToolbar,
    687687            mceStatusbar,
    688             wpStatusbar;
     688            wpStatusbar,
     689            isChromeRtl = ( editor.rtl && /Chrome/.test( navigator.userAgent ) );
    689690
    690691            if ( container ) {
     
    930931            toolbar.on( 'show', function() {
    931932                this.reposition();
     933
     934                if ( isChromeRtl ) {
     935                    tinymce.$( '.mce-widget.mce-tooltip' ).addClass( 'wp-hide-mce-tooltip' );
     936                }
     937            } );
     938
     939            toolbar.on( 'hide', function() {
     940                if ( isChromeRtl ) {
     941                    tinymce.$( '.mce-widget.mce-tooltip' ).removeClass( 'wp-hide-mce-tooltip' );
     942                }
    932943            } );
    933944
Note: See TracChangeset for help on using the changeset viewer.