Skip to content
Prev Previous commit
Next Next commit
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 <[email protected]>
  • Loading branch information
max-nextcloud authored and mejo- committed Jul 25, 2024
commit 460f5a8d30a3f6fe9cb44d078d73cf265ef9fb09
5 changes: 4 additions & 1 deletion src/components/Editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,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 }) {
Expand Down