Skip to content
Snippets Groups Projects
Unverified Commit 5cc3f404 authored by Christoph Wurst's avatar Christoph Wurst
Browse files

Prevent Vue from making the CKEditor instance reactive


Anything declared in `data()` is reactive. This makes sense most of the
time. For the editor intance, however, we don't really need (nor want)
Vue to overwrite all properties with reactive setters because we just
need the object to call a method on it later to insert a link at the
cursor position.

In recent versions of Firefox this somehow lead to the problem that
CKEditor (the non-vue part of it) called `pop` on an array that Vue
observed because of the reactivity through `data()`. And then when the
observer was invoked, the object didn't have a special Vue property. I
can't explain why that is or if that could be fixable in CKEditor, but
it's also not really supposed to work like that.

So this patch changes the editor instance to be assigned to `this`
without any former declaration in `data()`, hence Vue won't do its magic
and the CKEditor instance will remain untouched.

Signed-off-by: default avatarChristoph Wurst <christoph@winzerhof-wurst.at>
parent b6e0ac41
No related branches found
No related tags found
No related merge requests found
......@@ -87,7 +87,6 @@ export default {
text: '',
ready: false,
editor: Editor,
editorInstance: {},
config: {
placeholder: this.placeholder,
plugins,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment