Opened 11 years ago

Closed 10 years ago

#10717 closed Bug (expired)

iframe returning null in wysiwygarea/plugin.js

Reported by: dubcanada Owned by:
Priority: Normal Milestone:
Component: General Version: 4.2
Keywords: Cc:

Description

Hello,

I am using Drupal Panels and for some reason my ckeditor does not work on second load (if I open it, edit it, then close it, then reopen it, I get an error). The problem seems to be that in the code below, iframe is returning null.

491                 var editor = this.editor,
492                     doc = editor.document,
493                     iframe = editor.window.getFrame();
494
495                 framedWysiwyg.baseProto.detach.call( this );
496
497                 // Memory leak proof.
498                 this.clearCustomData();
499                 doc.getDocumentElement().clearCustomData();
500                 iframe.clearCustomData();
501                 CKEDITOR.tools.removeFunction( this._.frameLoadedHandler );
502
503                 var onResize = iframe.removeCustomData( 'onResize' );
504                 onResize && onResize.removeListener();
505
506
507                 editor.fire( 'contentDomUnload' );
508
509                 // IE BUG: When destroying editor DOM with the selection rem    ains inside
510                 // editing area would break IE7/8's selection system, we hav    e to put the editing
511                 // iframe offline first. (#3812 and #5441)
512                 iframe.remove();

I can't seem to figure out why it would be.

Regards,

  • Steve

Change History (4)

comment:1 Changed 11 years ago by dubcanada

If I put if statements around all the (iframe) stuff it works, but it doesn't "clearCustomData" anymore and duplicate content in subsequent loads occur.

Last edited 11 years ago by dubcanada (previous) (diff)

comment:2 Changed 11 years ago by dubcanada

Some more details https://drupal.org/node/1974754#comment-7745615 (see the bottom (my comments)). The issue seems to be that the CKEditor is removed from the DOM before destroying it. Causing issues when it is loaded again.

comment:3 Changed 11 years ago by Jakub Ś

Status: newpending
  1. Which module do you use - commercial or open source?
  2. Which module version do you use?
  3. Which drupal version do you use?

comment:4 Changed 10 years ago by Piotrek Koszuliński

Resolution: expired
Status: pendingclosed
Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy