Make WordPress Core

Changeset 37605


Ignore:
Timestamp:
06/01/2016 12:31:17 PM (8 years ago)
Author:
ocean90
Message:

TinyMCE: Fix inline toolbar positioning.

Introduced in [37000].
See https://github.com/tinymce/tinymce/commit/2fb8aa48e91101bd3ca4ff2d532bca3a8665fb24.
See https://github.com/tinymce/tinymce/commit/5734a8d8805d69ee87dd1cad7263244968194601.

Merge of [37559] to the 4.5 branch.

Props iseulde.
Fixes #36876.

Location:
branches/4.5
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.5

  • branches/4.5/src/wp-includes/js/tinymce/plugins/wordpress/plugin.js

    r37023 r37605  
    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
     
    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        } );
Note: See TracChangeset for help on using the changeset viewer.