danschultz/drag-drop.dart — pull request #10 by astashov (2014-02-25 01:50:27+00:00)
Title: Fix bug when mouseMove calls after mouseUp in DragManager

@danschultz PTAL

This should never happen (because we may reset _activeTarget back after
setting it to null in _mouseUp, which can cause exceptions).

But sometimes that may happen (e.g. in Chrome on Windows), because we
actually call globalOnDragEnd on the next tick after mouseUp. So,
sometimes the sequence of calls may be:

mouseMove -> mouseUp -> mouseMove -> globalOnDragEnd

To avoid that problem, let's just clear up _activeTarget in
globalOnDragEnd