Where should `draggable` be set?

I noticed that the static create for NodeViewDesc sets draggable on dom before outer deco is created (effectively nodeDOM). For nodes with contentDOM and no draggable attribute on their node spec, draggable gets managed on the dom (after outer deco wraps it).

Is this intended behavior or a bug? Should draggable always be set on the outer dom, even for nodes without contentDOM and without a draggablespec?

I agree that this should be consistent. I think it’s easier to always set it on the inner DOM, so that we don’t have to worry about re-setting the attribute when decorations change. Would that work for you?

Visually, the decorated node may be what the user identifies as the node, but the transaction can’t move the decorations. So, I do think nodeDOM is probably simpler and correct.

This patch makes that change. Does it solve this for you?

I was thinking of this code: prosemirror-view/src/viewdesc.ts at master · ProseMirror/prosemirror-view · GitHub

Oh that’s a good point. I’ve followed up with another patch.

Looks great. Thanks for clearing that up!

I’ve tagged a prosemirror-view 1.41.1 with these changes.