Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Closed
OliverM opened this Issue · 3 comments

4 participants

@OliverM

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 https://github.com/OliverM/sc-DragAndDropSample 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
Owner

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?

@nicolasbadia
Collaborator

Just published a PR to fix this.

@publickeating

Fixed by #1039

@mirion mirion referenced this issue from a commit in mirion/sproutcore
@nicolasbadia nicolasbadia SC.Drag refactor
SC.Drag now fire dragEnded when cancelling a drag and drop operation
using the escape key:
sproutcore#513

Also fix a possible memory leak with the _cachedDropTargets property.
507fd6a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.