File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 508
508
detach : function ( ) {
509
509
var editor = this . editor ,
510
510
doc = editor . document ,
511
- iframe = editor . window . getFrame ( ) ,
511
+ iframe ,
512
512
onResize ;
513
513
514
+ // Trying to access window's frameElement property on Edge throws an exception
515
+ // when frame was already removed from DOM. (#13850, #13790)
516
+ try {
517
+ iframe = editor . window . getFrame ( ) ;
518
+ } catch ( e ) { }
519
+
514
520
framedWysiwyg . baseProto . detach . call ( this ) ;
515
521
516
522
// Memory leak proof.
517
523
this . clearCustomData ( ) ;
518
524
doc . getDocumentElement ( ) . clearCustomData ( ) ;
519
525
CKEDITOR . tools . removeFunction ( this . _ . frameLoadedHandler ) ;
520
526
521
- if ( iframe ) {
527
+ // On IE, iframe is returned even after remove() method is called on it.
528
+ // Checking if parent is present fixes this issue. (#13850)
529
+ if ( iframe && iframe . getParent ( ) ) {
522
530
iframe . clearCustomData ( ) ;
523
531
onResize = iframe . removeCustomData ( 'onResize' ) ;
524
532
onResize && onResize . removeListener ( ) ;
You can’t perform that action at this time.
0 commit comments