]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/js/tinymce/plugins/wordpress/plugin.js
Wordpress 4.5.3-scripts
[autoinstalls/wordpress.git] / wp-includes / js / tinymce / plugins / wordpress / plugin.js
index 968ebd9a6b2e9943ab4c2c6affd32e303757f3a4..3ea329c608248ecd8be31afb7d8537d8e957b9a7 100644 (file)
@@ -902,7 +902,12 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
                                if ( activeToolbar.tempHide || event.type === 'hide' ) {
                                        activeToolbar.hide();
                                        activeToolbar = false;
-                               } else if ( ( event.type === 'resize' || event.type === 'scroll' ) && ! activeToolbar.blockHide ) {
+                               } else if ( (
+                                       event.type === 'resizewindow' ||
+                                       event.type === 'scrollwindow' ||
+                                       event.type === 'resize' ||
+                                       event.type === 'scroll'
+                               ) && ! activeToolbar.blockHide ) {
                                        clearTimeout( timeout );
 
                                        timeout = setTimeout( function() {
@@ -918,11 +923,13 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
                        }
                }
 
-               DOM.bind( window, 'resize scroll', hide );
+               // For full height editor.
+               editor.on( 'resizewindow scrollwindow', hide );
+               // For scrollable editor.
                editor.dom.bind( editor.getWin(), 'resize scroll', hide );
 
                editor.on( 'remove', function() {
-                       DOM.unbind( window, 'resize scroll', hide );
+                       editor.off( 'resizewindow scrollwindow', hide );
                        editor.dom.unbind( editor.getWin(), 'resize scroll', hide );
                } );