Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gracefully handle deletion of source node while dragging #9

Closed
gaearon opened this issue Oct 22, 2014 · 0 comments
Closed

Gracefully handle deletion of source node while dragging #9

gaearon opened this issue Oct 22, 2014 · 0 comments

Comments

@gaearon
Copy link
Member

gaearon commented Oct 22, 2014

I noticed that if I remove drag source node while drag operation is in progress, it never finishes. The reason for this is dragend not firing on removed elements.

We should perhaps add top-level window drop handler around here to check if drag source node was removed from DOM. In this case, we should somehow invoke pending handleDragEnd because the component might still be mounted (even though one of inner nodes was removed).

We need to think if we should invoke handleDragEnd if the component itself is unmounted by the time it happens. Probably not, but this would break beginDrag/endDrag symmetry. Another option is to invoke endDrag in componentWillUnmount with didDrop=false if there is a pending drag operation by the time component is unmounted.

kkga pushed a commit that referenced this issue Apr 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant