Skip to content
Permalink
Browse files

Merge branch 't/13850'

  • Loading branch information...
mlewand committed Oct 23, 2015
2 parents 8eb2434 + 2b3093b commit 74aa13428cd61f91a04fe302dda3ac91a869cf0c
Showing with 10 additions and 2 deletions.
  1. +10 −2 plugins/wysiwygarea/plugin.js
@@ -508,17 +508,25 @@
detach: function() {
var editor = this.editor,
doc = editor.document,
iframe = editor.window.getFrame(),
iframe,
onResize;

// Trying to access window's frameElement property on Edge throws an exception
// when frame was already removed from DOM. (#13850, #13790)
try {
iframe = editor.window.getFrame();
} catch ( e ) {}

framedWysiwyg.baseProto.detach.call( this );

// Memory leak proof.
this.clearCustomData();
doc.getDocumentElement().clearCustomData();
CKEDITOR.tools.removeFunction( this._.frameLoadedHandler );

if ( iframe ) {
// On IE, iframe is returned even after remove() method is called on it.
// Checking if parent is present fixes this issue. (#13850)
if ( iframe && iframe.getParent() ) {
iframe.clearCustomData();
onResize = iframe.removeCustomData( 'onResize' );
onResize && onResize.removeListener();

0 comments on commit 74aa134

Please sign in to comment.
You can’t perform that action at this time.