Skip to content

Commit 7c04957

Browse files
committed
Small refactor
1 parent 9e7256a commit 7c04957

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

packages/core/src/editor/BlockNoteEditor.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,6 +1107,13 @@ export class BlockNoteEditor<
11071107
this.prosemirrorView.focus();
11081108
}
11091109

1110+
public blur() {
1111+
if (this.headless) {
1112+
return;
1113+
}
1114+
this.prosemirrorView.dom.blur();
1115+
}
1116+
11101117
public onUploadStart(callback: (blockId?: string) => void) {
11111118
this.onUploadStartCallbacks.push(callback);
11121119

packages/core/src/extensions/SideMenu/SideMenuPlugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,7 @@ export class SideMenuProsemirrorPlugin<
739739
this.view.isDragOrigin = false;
740740
}
741741

742-
this.editor.domElement?.blur();
742+
this.editor.blur();
743743
};
744744
/**
745745
* Freezes the side menu. When frozen, the side menu will stay

0 commit comments

Comments
 (0)