WordPress.org

Make WordPress Core

Changeset 45610


Ignore:
Timestamp:
07/09/2019 01:09:53 AM (16 months ago)
Author:
azaozz
Message:

TinyMCE: fix flickering inline toolbar when hovering over the buttons there and the vertical scrollbar is not shown (the page height is less than the window height). Improves/removes the previous fix for similar flickering but only in RTL, see #42018.

Props joakimsilfverberg, mukesh27, kokers, Howdy_McGee, noisysocks, azaozz.
Fixes #44911.

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/_enqueues/vendor/tinymce/plugins/wordpress/plugin.js

    r45066 r45610  
    789789            mceToolbar,
    790790            mceStatusbar,
    791             wpStatusbar,
    792             isChromeRtl = ( editor.rtl && /Chrome/.test( navigator.userAgent ) );
     791            wpStatusbar;
    793792
    794793            if ( container ) {
     
    10411040            toolbar.on( 'show', function() {
    10421041                this.reposition();
    1043 
    1044                 if ( isChromeRtl ) {
    1045                     tinymce.$( '.mce-widget.mce-tooltip' ).addClass( 'wp-hide-mce-tooltip' );
    1046                 }
    1047             } );
    1048 
    1049             toolbar.on( 'hide', function() {
    1050                 if ( isChromeRtl ) {
    1051                     tinymce.$( '.mce-widget.mce-tooltip' ).removeClass( 'wp-hide-mce-tooltip' );
    1052                 }
    10531042            } );
    10541043
     
    11411130        }
    11421131
    1143         editor.dom.bind( editor.getWin(), 'resize', hide );
    1144 
    11451132        if ( editor.inline ) {
     1133            editor.on( 'resizewindow', hide );
     1134
    11461135            // Enable `capture` for the event.
    11471136            // This will hide/reposition the toolbar on any scrolling in the document.
     
    11491138        } else {
    11501139            editor.dom.bind( editor.getWin(), 'scroll', hide );
     1140
    11511141            // For full height iframe editor.
    11521142            editor.on( 'resizewindow scrollwindow', hide );
     
    11561146            document.removeEventListener( 'scroll', hide, true );
    11571147            editor.off( 'resizewindow scrollwindow', hide );
    1158             editor.dom.unbind( editor.getWin(), 'resize scroll', hide );
     1148            editor.dom.unbind( editor.getWin(), 'scroll', hide );
    11591149        } );
    11601150
  • trunk/src/wp-includes/css/editor.css

    r45477 r45610  
    802802.mce-tooltip {
    803803    margin-top: 2px;
    804 }
    805 
    806 /* Don't show the tooltip. Used in Chrome RTL, see #42018 */
    807 .rtl .mce-tooltip.wp-hide-mce-tooltip {
    808     display: none !important;
    809804}
    810805
Note: See TracChangeset for help on using the changeset viewer.