Opened 15 years ago
Closed 15 years ago
#5727 closed Bug (invalid)
Problem creating and destroying instances
Reported by: | vurentjie | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | |
Keywords: | Confirmed | Cc: |
Description
I found a problem creating and destroying the editor,
Firebug gave the error m.element is not defined on line 124 of the minified ckeditor.js (the editor's destroy method) which has the following :
if(m.elementMode==1)m.element.show();
I added the following
if(m.elementMode==1 && m.element)m.element.show();
this corrected the issue.
Attachments (1)
Change History (3)
Changed 15 years ago by
Attachment: | ckbug.html added |
---|
comment:1 Changed 15 years ago by
Keywords: | Confirmed added; destroy removed |
---|
This one is much probably related to #5441.
comment:2 Changed 15 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
The cancel button is calling "editor.destroy();", but it isn't clearing the editor variable, so when a new editor is created, it tries again to destroy the previous instance:
if(editor)editor.destroy(); }}}} This fixes the problem: {{{ var cancelButton=$('<input type="button" value="Cancel" />').click(function(){ /*for(var i in editor){ if(typeof editor[i]=='function')alert(i+':'+editor[i]); }*/ options.remove(); editor.destroy(); editor = null; }); }}}
a html that will help reproduce the error, will need to relink the jquery and ckeditor.js files