Make WordPress Core

Ticket #36876: 36876.2.patch

File 36876.2.patch, 1.2 KB (added by iseulde, 9 years ago)
  • src/wp-includes/js/tinymce/plugins/wordpress/plugin.js

     
    902902                                if ( activeToolbar.tempHide || event.type === 'hide' ) {
    903903                                        activeToolbar.hide();
    904904                                        activeToolbar = false;
    905                                 } else if ( ( event.type === 'resize' || event.type === 'scroll' ) && ! activeToolbar.blockHide ) {
     905                                } else if ( (
     906                                        event.type === 'resizewindow' ||
     907                                        event.type === 'scrollwindow' ||
     908                                        event.type === 'resize' ||
     909                                        event.type === 'scroll'
     910                                ) && ! activeToolbar.blockHide ) {
    906911                                        clearTimeout( timeout );
    907912
    908913                                        timeout = setTimeout( function() {
     
    918923                        }
    919924                }
    920925
    921                 DOM.bind( window, 'resize scroll', hide );
     926                // For full height editor.
     927                editor.on( 'resizewindow scrollwindow', hide );
     928                // For scrollable editor.
    922929                editor.dom.bind( editor.getWin(), 'resize scroll', hide );
    923930
    924931                editor.on( 'remove', function() {
    925                         DOM.unbind( window, 'resize scroll', hide );
     932                        editor.off( 'resizewindow scrollwindow', hide );
    926933                        editor.dom.unbind( editor.getWin(), 'resize scroll', hide );
    927934                } );
    928935