File tree 3 files changed +8
-2
lines changed
3 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -1502,6 +1502,9 @@ export class BlockNoteEditor<
1502
1502
if ( ! raw ) {
1503
1503
htmlToPaste = this . convertHtmlToBlockNoteHtml ( html ) ;
1504
1504
}
1505
+ if ( ! htmlToPaste ) {
1506
+ return ;
1507
+ }
1505
1508
this . prosemirrorView ?. pasteHTML ( htmlToPaste ) ;
1506
1509
}
1507
1510
Original file line number Diff line number Diff line change @@ -86,7 +86,9 @@ class SuggestionMenuView<
86
86
this . pluginState = stopped ? prev : next ;
87
87
88
88
if ( stopped || ! this . editor . isEditable ) {
89
- this . state ! . show = false ;
89
+ if ( this . state ) {
90
+ this . state . show = false ;
91
+ }
90
92
this . emitUpdate ( this . pluginState ! . triggerCharacter ) ;
91
93
92
94
return ;
Original file line number Diff line number Diff line change @@ -44,7 +44,8 @@ const ThreadItem = React.memo(
44
44
// If the focused element is within the action toolbar, we don't want to
45
45
// blur the thread for UX reasons.
46
46
if (
47
- ( event . relatedTarget as HTMLElement ) . closest ( ".bn-action-toolbar" )
47
+ ! event . relatedTarget ||
48
+ event . relatedTarget . closest ( ".bn-action-toolbar" )
48
49
) {
49
50
return ;
50
51
}
You can’t perform that action at this time.
0 commit comments