Opened 10 years ago
Closed 10 years ago
#12360 closed Bug (duplicate)
CKEditor in draggable element
Reported by: | Vadim | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | |
Keywords: | Cc: | Roman_Matusevich@… |
Description
There's a draggable element with CKEditor instance in it. Each time the element is dragged CKEditor instance is destroyed and then replaced via attach function.
The error occurs in IE'11 when dragging, it returns an error that the instance is already attached. It means that it wasn't deleted previously.
Change History (3)
comment:1 follow-up: 2 Changed 10 years ago by
Keywords: | CKeditor drag removed |
---|---|
Status: | new → pending |
comment:2 Changed 10 years ago by
Unfortunately I didn't manage to recreate the bug in JSFiddle, but at least it briefly shows the case where it appears: http://jsfiddle.net/aruperu/yv855r5n/
Though in our local environment following errors are returned: http://gyazo.com/0f21ef147ebc23c21dcdef279d480295
1) SCRIPT5007: Unable to get property 'document' of undefined or null reference File: ckeditor.js, Line: 769, Column: 368
2) SCRIPT70: Permission denied File: ckeditor.js, Line: 81, Column: 172
3) SCRIPT5022: The editor instance "edit-field-topic-overview-section-und-7-field-topic-section-body-und-0-value" is already attached to the provided element. File: ckeditor.js, Line: 311, Column: 122
Errors #2 and #3 are repeated as one drags the div with hidden CKE.
Replying to j.swiderski:
Please provide reduced sample HTML file that can be put in samples folder and will show this issue.
My guess is that editor is not destroyed properly but I would need to see working code to make sure.
comment:3 Changed 10 years ago by
Resolution: | → duplicate |
---|---|
Status: | pending → closed |
Thank you for the code. Your issue is a duplicate of #11857.
Basically when iframe is detached from DOM (it happens durring drag&drop) it breaks. You need to destroy editor before it is detached from DOM and create editor instance once it is attached to DOM.
Another option would be using inline editor which doesn't use iframe thus is free from this problem.
Please provide reduced sample HTML file that can be put in samples folder and will show this issue.
My guess is that editor is not destroyed properly but I would need to see working code to make sure.