Skip to content

Commit 33d8637

Browse files
authored
fix setEditable called when not necessary (#635)
1 parent 1e9d7fb commit 33d8637

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/core/src/editor/BlockNoteEditor.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,9 @@ export class BlockNoteEditor<
654654
* @param editable True to make the editor editable, or false to lock it.
655655
*/
656656
public set isEditable(editable: boolean) {
657-
this._tiptapEditor.setEditable(editable);
657+
if (this._tiptapEditor.options.editable !== editable) {
658+
this._tiptapEditor.setEditable(editable);
659+
}
658660
}
659661

660662
/**

0 commit comments

Comments
 (0)