Skip to content

Commit 7493c4e

Browse files
fix: Firefox invisible text cursor after dropping blocks (#2128)
* Made dropping block blur editor * Small refactor
1 parent a95859f commit 7493c4e

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,8 @@ export class SideMenuProsemirrorPlugin<
738738
if (this.view) {
739739
this.view.isDragOrigin = false;
740740
}
741+
742+
this.editor.blur();
741743
};
742744
/**
743745
* Freezes the side menu. When frozen, the side menu will stay

0 commit comments

Comments
 (0)