File tree Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -1502,6 +1502,9 @@ export class BlockNoteEditor<
15021502 if ( ! raw ) {
15031503 htmlToPaste = this . convertHtmlToBlockNoteHtml ( html ) ;
15041504 }
1505+ if ( ! htmlToPaste ) {
1506+ return ;
1507+ }
15051508 this . prosemirrorView ?. pasteHTML ( htmlToPaste ) ;
15061509 }
15071510
Original file line number Diff line number Diff line change @@ -86,7 +86,9 @@ class SuggestionMenuView<
8686 this . pluginState = stopped ? prev : next ;
8787
8888 if ( stopped || ! this . editor . isEditable ) {
89- this . state ! . show = false ;
89+ if ( this . state ) {
90+ this . state . show = false ;
91+ }
9092 this . emitUpdate ( this . pluginState ! . triggerCharacter ) ;
9193
9294 return ;
Original file line number Diff line number Diff line change @@ -44,7 +44,8 @@ const ThreadItem = React.memo(
4444 // If the focused element is within the action toolbar, we don't want to
4545 // blur the thread for UX reasons.
4646 if (
47- ( event . relatedTarget as HTMLElement ) . closest ( ".bn-action-toolbar" )
47+ ! event . relatedTarget ||
48+ event . relatedTarget . closest ( ".bn-action-toolbar" )
4849 ) {
4950 return ;
5051 }
You can’t perform that action at this time.
0 commit comments