Cancelling a drag and drop operation using the escape key doesn't fire the dragEnded function #513

OliverM opened this Issue Jun 15, 2011 · 3 comments


None yet

4 participants

OliverM commented Jun 15, 2011

The docs for SC.DropTarget describe a protocol for drop targets, including a state-machine type description of the sequence of events that can be expected. This sequence is not followed when a drag operation is interrupted with the escape key. Specifically, the dragEnded function on the drop target is never called. When the escape key is pressed when the SC.Drag view is over the drop target, the drop target's dragExited function is called, but the dragEnded function still isn't called.

The sample project at has a minimal implementation that shows the issue. console.log() statements are fired at each of the drop target protocol functions. Pressing escape after starting to drag from the red view on the left won't display a "Drag ended." message as expected.

dcporter commented Aug 5, 2013

Bumping this. @nicolasbadia @publickeating If the docs are describing a state sequence that's not happening, that sounds like an issue (and one which we may have made worse recently). Thoughts?


Just published a PR to fix this.


Fixed by #1039

@mirion mirion pushed a commit to mirion/sproutcore that referenced this issue Nov 8, 2013
@nicolasbadia @publickeating nicolasbadia + publickeating SC.Drag refactor
SC.Drag now fire dragEnded when cancelling a drag and drop operation
using the escape key:

Also fix a possible memory leak with the _cachedDropTargets property.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment