Opened 4 years ago

Closed 4 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 Changed 4 years ago by Jakub Ś

Keywords: CKeditor drag removed
Status: newpending

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:2 in reply to:  1 Changed 4 years ago by Vadim

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.

Last edited 4 years ago by Vadim (previous) (diff)

comment:3 Changed 4 years ago by Jakub Ś

Resolution: duplicate
Status: pendingclosed

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.

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy