TinyMCE: inline toolbar: fix memory leaks

Part props ungestaltbar.
Fixes #32873.


git-svn-id: https://develop.svn.wordpress.org/trunk@33294 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ella Iseulde Van Dorpe 2015-07-16 11:10:28 +00:00
parent 524225187f
commit 795b2211fb

View File

@ -764,6 +764,10 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
}
} );
editor.on( 'remove', function() {
toolbar.remove();
} );
toolbar.reposition = reposition;
toolbar.hide().renderTo( document.body );
@ -830,6 +834,12 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
DOM.bind( window, 'resize scroll', hide );
editor.dom.bind( editor.getWin(), 'resize scroll', hide );
editor.on( 'remove', function() {
DOM.unbind( window, 'resize scroll', hide );
editor.dom.unbind( editor.getWin(), 'resize scroll', hide );
} );
editor.on( 'blur hide', hide );
editor.wp = editor.wp || {};