Update WP and plugins

This commit is contained in:
Oliver Davies 2019-04-16 20:56:22 +01:00
parent 10a4713229
commit 1fb77fc4ff
864 changed files with 101724 additions and 78262 deletions

View file

@ -1064,12 +1064,20 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
}
}
// For full height editor.
editor.on( 'resizewindow scrollwindow', hide );
// For scrollable editor.
editor.dom.bind( editor.getWin(), 'resize scroll', hide );
editor.dom.bind( editor.getWin(), 'resize', hide );
if ( editor.inline ) {
// Enable `capture` for the event.
// This will hide/reposition the toolbar on any scrolling in the document.
document.addEventListener( 'scroll', hide, true );
} else {
editor.dom.bind( editor.getWin(), 'scroll', hide );
// For full height iframe editor.
editor.on( 'resizewindow scrollwindow', hide );
}
editor.on( 'remove', function() {
document.removeEventListener( 'scroll', hide, true );
editor.off( 'resizewindow scrollwindow', hide );
editor.dom.unbind( editor.getWin(), 'resize scroll', hide );
} );