From 6015463c559d1df0b8b12e2f6951c99fefad0f76 Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 17 Jun 2024 12:15:59 +0200 Subject: [PATCH] fix(editor): only setEditable when needed This will trigger an update event on the editor which in turn will trigger all update handlers. Avoid this when not necessary. Signed-off-by: Max --- src/components/Editor.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/Editor.vue b/src/components/Editor.vue index ca28141f38d..adb41971301 100644 --- a/src/components/Editor.vue +++ b/src/components/Editor.vue @@ -558,7 +558,10 @@ export default { this.document = document this.syncError = null - this.$editor.setEditable(!this.readOnly) + const editable = !this.readOnly + if (this.$editor.isEditable !== editable) { + this.$editor.setEditable(editable) + } }, onSync({ steps, document }) {