prosemirror-view, as best I can tell, will try very hard to add draggable="true" to any node that does not have draggable: false and selectable: false.
I’m seeing:
- In ViewDesc.create, if a node has no contentDOM and is draggable,
draggableis set to true - In ViewDesc.selectNode, if a node has no contentDOM or is not draggable,
draggableis set to true. This covers every node not covered by step one, unless they have a custom node view with a selectNode override - And then in input.ts, the MouseDown handler class checks if there’s a NodeSelection on the target node, and adds
draggable="true"if so. So that covers every node that can have a NodeSelection.
This makes it very challenging to override the default browser drag behavior. The default browser drag behavior has some nice things going for it, but also has some downsides (notably, pretty limited control over the actual visual representation of the drag interaction).
So I guess my questions are:
- Am I missing something? Is there a way to disable the default browser draggable behavior for a node type?
- If not, would it be possible to add support for that?