I’m having a hard time implementing clickable buttons in a node-view in such a way that the click doesn’t also move the cursor.
I’ve added event.stopPropagation()
, event.preventDefault()
and return false
to all of: onmouseup, onmousedown, onpointerup, onpointerdown, onclick, but the caret still moves sometimes.
I realise I can use the handleClickOn
editor prop, but I’d rather avoid a global coupling like that if I can. I’m a bit mystified how the event is still getting through.
BTW my node-views are implemented using SolidJS (which is a brilliant fit with ProseMirror) so it’s possible I am missing some SolidJS subtlety about event handling, but I don’t think so.
Thanks
Tom