Is your feature request related to a problem? Please describe.
Currently there is a canDrag predicate that can be assigned to a drag source in react-dnd. However, the HTML5Backend currently sets "draggable" to true for a drag source regardless what this predicate returns. It should actually set the draggable property in this line:
|
node.setAttribute('draggable', 'true') |
based on canDrag from the monitor or options.
This can allow developers to prevent bugs such as this one:
#438
by setting canDrag based on a focus predicate.
Describe the solution you'd like
That when canDrag is false for a drag source, the draggable attribute for that drag source ref is set to false.
Is your feature request related to a problem? Please describe.
Currently there is a
canDragpredicate that can be assigned to a drag source in react-dnd. However, the HTML5Backend currently sets "draggable" to true for a drag source regardless what this predicate returns. It should actually set the draggable property in this line:react-dnd/packages/backend-html5/src/HTML5BackendImpl.ts
Line 144 in ed963cd
based on
canDragfrom the monitor or options.This can allow developers to prevent bugs such as this one:
#438
by setting canDrag based on a focus predicate.
Describe the solution you'd like
That when canDrag is false for a drag source, the draggable attribute for that drag source ref is set to false.