File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
src/extensions/behavior/SelectionContext Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 11import { keydownHandler } from 'prosemirror-keymap' ;
2- import { type EditorState , Plugin , type PluginSpec , TextSelection } from 'prosemirror-state' ;
2+ import {
3+ AllSelection ,
4+ type EditorState ,
5+ Plugin ,
6+ type PluginSpec ,
7+ TextSelection ,
8+ } from 'prosemirror-state' ;
39import type { EditorProps , EditorView } from 'prosemirror-view' ;
410
511import { ActionStorage , ExtensionAuto } from '../../../core' ;
@@ -102,7 +108,10 @@ class SelectionTooltip implements PluginSpec<unknown> {
102108
103109 const { selection} = state ;
104110 // Hide the tooltip if the selection is empty
105- if ( selection . empty || ! ( selection instanceof TextSelection ) ) {
111+ if (
112+ selection . empty ||
113+ ! ( selection instanceof TextSelection || selection instanceof AllSelection )
114+ ) {
106115 this . tooltip . hide ( view ) ;
107116 return ;
108117 }
You can’t perform that action at this time.
0 commit comments