Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed breaking code when creating and destroying the editors #40

Closed
wants to merge 1 commit into from

Conversation

bleadof
Copy link

@bleadof bleadof commented May 10, 2013

http://jsfiddle.net/Z4dBN/4/

This is the setup I've encountered the JS errors with and my patch will get rid of those errors. It's a quick patch and I haven't dug deeper into why errors happen, but I know for sure it's because I'm destroying and attaching editors very quickly. During this some events are lagging a bit behind and the editor.element reference is already gone when some of the events are triggered.

I don't know why the editor doesn't show up on the fiddle, it does on my computer, but I think this fiddle still points out the problem.

If you want me to change the patch so that the element reference is checked elsewhere, I'm more than happy to do so.

mdenburger pushed a commit to onehippo/ckeditor that referenced this pull request Dec 3, 2013
mdenburger pushed a commit to onehippo/ckeditor that referenced this pull request Dec 3, 2013
@Reinmar
Copy link
Member

Reinmar commented Dec 27, 2013

First of all - I'm sorry for the delay. 8 months is a much too long time for a response ;).

From the changes you proposed I conclude that you destroy editor before configuration loads. There are couple of other moments when editor cannot be destroyed and we are planning to make necessary architecture changes to avoid these situations. But it has to be a general fix and the patch proposed by you just prevents from error being thrown. So for now, let's not make the code more blurry.

@Reinmar Reinmar closed this Dec 27, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants