Remove call to CKEDITOR.removeAllListeners() #332
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!