Remove call to CKEDITOR.removeAllListeners()#332
Open
closesimple-mf wants to merge 1 commit intoyabab-dev:masterfrom
Open
Remove call to CKEDITOR.removeAllListeners()#332closesimple-mf wants to merge 1 commit intoyabab-dev:masterfrom
closesimple-mf wants to merge 1 commit intoyabab-dev:masterfrom
Conversation
This screws up widget placeholder deletion in subsequent editors that are created -
possibly because the new editor gets created first, then this gets called, as this
is run async in a zone.
this.instance.destroy(); is good enough. I looked in to it in ckeditor and it
calls this.removeAllListeners(), removing its own listeners and not other ckeditor
instance listeners
|
Hello everyone, I can confirm that this bug is still causing problems. Please accept this fix to avoid further issues. Thank you very much for your contributions and for providing the solution to the problem. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello,
I believe we found a bug in this library a while back that was introduced in 5ada62c
We have a custom ckeditor plugin that replaces references like
${thisOne}with a fancy looking 'placeholder' you can click on to open a model. Pressing backspace deletes the entire placeholder at once.After upgrading this library we noticed you could no longer delete the placeholder, and the cursor would jump to the bottom when pressing backspace:
As well as console errors:

I tracked it down to the call to
CKEDITOR.removeAllListeners(). What I believe was happening was that if a ckeditor instance got destroyed on the page, it would remove all listeners off of all ckeditor instances, and screwed up ck's plugin system somehow.I debugged in to ckeditor's source and saw the call this library does to
this.instance.destroy();should be sufficient for the cleanup.destroy()callsthis.removeAllListeners(), removing its own listeners and not other ckeditor instance listeners:We've been running with this change in production for a while now.
Thanks!