Opened 10 years ago

Closed 10 years ago

#11295 closed Bug (duplicate)

can't destroy before setData has finished

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

Description

When calling instance.destroy() before instance.setData() has finished there is an error.

This is illustrated here: http://jsfiddle.net/sSPe7/1/

Change History (3)

comment:1 Changed 10 years ago by tepez

Summary: destroy has to wait for setDatacan't destroy before setData has finished

comment:2 Changed 10 years ago by Anders Johansson

There is even no need to call setData() to provoke the error. Simply calling destroy() immediately after creation produces the same error.

http://jsfiddle.net/sSPe7/2/

comment:3 Changed 10 years ago by Jakub Ś

Resolution: duplicate
Status: newclosed

This is a duplicate of #11502 and will be closed as such.

We are going to try to solve this in CKEditor 5 (If it will be possible). In CKEditor 4 developer is obligated to api to control this.
Currently it is hard to stop all running processes when they were started (both are complicated) that is why there are events that you should use in such cases - http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-afterSetData, http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-instanceReady.

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