Hi all,
I’m listening for the drop event within the codemirror 6 editor
When something gets dropped, an eventual file gets processed
Now I’m using the dropCursor()
extensions and there’s the problem that, after dropping, the drop-cursor dummy stays at the dropped position
I can still move the real cursor around but the dummy remains
My question is - how can I remove that cursor programmatically?
I appreciate your help,
Thank you,
Simon
marijn
September 12, 2023, 11:36am
2
You can’t remove it programmatically, but you shouldn’t need to—it sticking around was a bug. To properly solve that I’ve added a thing called “event observers”, which always run, even if other extensions handle the event. That should fix this. See these patches.
committed 11:31AM - 12 Sep 23 UTC
FEATURE: The new `EditorView.domEventObservers` (and the corresponding option
to… view plugins) allows you to register functions that are always called for an
event, regardless of whether other handlers handled it.
See https://discuss.codemirror.net/t/how-to-remove-the-dropcursor-programmatically/7086
committed 11:34AM - 12 Sep 23 UTC
FIX: Make sure the drop cursor is properly cleaned up even when another extensio… n
handles the drop event.
See https://discuss.codemirror.net/t/how-to-remove-the-dropcursor-programmatically/7086
You’re amazing, thank you!