Opened 12 years ago
Closed 12 years ago
#10274 closed Bug (invalid)
Changing CKEditor container renders CKEditor unusable
Reported by: | Chema | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 4.1.1 |
Keywords: | Cc: |
Description
After initializing CKEditor, if you switch its container (or parents container for that matter), CKEditor looses all content and becomes unusable. The editor is not able to gain focus again so it's impossible to write on it. The toolbar buttons remain active and clicking on them throws an exception on the console.
I'm attaching a very basic sample to test this.
So far, I've checked on MacOS X 10.7.5 in Chrome and Firefox, and I've verified this happens in 4.1.1 (master) and released versions 4.0 and 3.6
Attachments (1)
Change History (4)
Changed 12 years ago by
comment:1 Changed 12 years ago by
I observed that this was related to CKEditor's iframe losing state.
After digging a little bit, it seems that this is related to https://bugzilla.mozilla.org/show_bug.cgi?id=254144 where the comments state that this is "as spec", so webkit suffers from the same issue.
comment:2 Changed 12 years ago by
One last comment, if one has access to the moment when the dom element is moved, there's a possible workaround consisting in destroying the editor prior to moving the node, and then creating it again.
To see it working, replace in the attached example the appendChild line for
CKEDITOR.instances.editor1.destroy(); nextContainer.appendChild(editor); CKEDITOR.replace("editor1");
Maybe a more general workaround could be implemented somehow using this idea...
comment:3 Changed 12 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
CKEditor cannot be moved from one place to another. You should destroy editor in one place and initialize it again in another.
Simple demo to test the bug