File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
src/extensions/behavior/SelectionContext Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 1
1
import { keydownHandler } from 'prosemirror-keymap' ;
2
+ import type { Node } from 'prosemirror-model' ;
2
3
import {
3
4
AllSelection ,
4
5
type EditorState ,
5
6
Plugin ,
6
7
type PluginSpec ,
7
8
TextSelection ,
8
9
} from 'prosemirror-state' ;
10
+ // @ts -ignore // TODO: fix cjs build
9
11
import { hasParentNode } from 'prosemirror-utils' ;
10
12
import type { EditorProps , EditorView } from 'prosemirror-view' ;
11
13
@@ -143,7 +145,7 @@ class SelectionTooltip implements PluginSpec<unknown> {
143
145
isCodeBlock ( selection . $from . parent ) ||
144
146
isCodeBlock ( selection . $to . parent ) ||
145
147
// or when selection is inside node where context menu is disabled
146
- hasParentNode ( ( node ) => node . type . spec . selectionContext === false ) ( selection )
148
+ hasParentNode ( ( node : Node ) => node . type . spec . selectionContext === false ) ( selection )
147
149
) {
148
150
this . tooltip . hide ( view ) ;
149
151
return ;
You can’t perform that action at this time.
0 commit comments