Dragging with mouse events and Pointer Events

Move both blocks inside their bounds. The Pointer Events version also accepts touch, pen and arrow keys.

Classic mouse listeners

Pointer capture