Skip to content

Nesting - Drag Sources

Drag sources can be nested. Grabbing an inner box drags that box, not its parent, because the inner BdndDraggable stops the dragstart from bubbling. Drop any of them on the bin to see which item was actually dragged. The checkboxes set each box's CanDrag: a box that may not drag renders draggable="false", leaves the keyboard's tab order, and hands a press to the nearest box around it that may drag - forbid the inner box and grabbing it drags the middle one. (CanDragPredicate is the same switch as a function, asked at render time and again as a drag starts.)

Forbid drag:
outer (drag the margin)
middle
inner
Drop a box here
An unhandled error has occurred. Reload 🗙