How can i custom the shift + singleClick behavious?

I read the source code, found if press shift key and click ,then will not trigger the handleClickOn event callback.

so is anyway that i cound custom the event?

i want to select multi node by press shift key and click node .

You can use handleDOMEvents to register direct event handlers.

if use handleDOMEvents ,then I need custom many event.

if shift press, the handleClickOn and handleClick will not be emited. And i need the click node and node pos info.

if add a EditView props , may be a good idea.

this.allowDefault = view.props.allowDefaultShiftKey === false ? false : event.shiftKey;

I use the handleDOMEvents click event and fixed this problem.

@marijn Is there a reason why it’s assumed that the handleClickOn should not be called just because the shift key was pressed during the down?

Shift-click is left to the browser’s native handling because ProseMirror doesn’t implement its own drag-selection.

Thanks for replying. Ok so the idea is that if one were going to drag an existing selection? So could that not be set if the selection is empty? The MouseDown already will clear/set the allowDefault to true if one moves the mouse a bit. The issue I have is that we want to actually act on a shift+click (of an image in our case) and because the allowDefault is set to true based on the shiftKey state of the mouse at the time of the down it won’t even try to call the handleClickOn even though the mouse didn’t move beyond that 4px threshold.

You’ll have to handle the DOM events directly, rather than going through handleClickOn.