Skip to content

Commit d79c1d1

Browse files
authored
fix(plugin-block): fix mouse move debouncing does not work (#1271)
1 parent b498315 commit d79c1d1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: packages/plugin-block/src/block-service.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ export class BlockService {
166166
}
167167

168168
/// @internal
169-
#mousemoveCallback = (view: EditorView, event: MouseEvent) => {
169+
#mousemoveCallback = debounce((view: EditorView, event: MouseEvent) => {
170170
if (!view.editable)
171171
return
172172

@@ -192,14 +192,14 @@ export class BlockService {
192192
return
193193
}
194194
this.#show(result)
195-
}
195+
}, 20)
196196

197197
/// @internal
198198
mousemoveCallback = (view: EditorView, event: MouseEvent) => {
199199
if (view.composing || !view.editable)
200200
return false
201201

202-
debounce(this.#mousemoveCallback, 20)(view, event)
202+
this.#mousemoveCallback(view, event)
203203

204204
return false
205205
}

0 commit comments

Comments
 (0)