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

Don't fire draggable:end if draggable:start has not been fired #203

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cdauth
Copy link
Contributor

@cdauth cdauth commented Nov 24, 2015

draggable:start is fired when the first mousemove happens after mousedown. Currently, draggable:end is fired on mouseup, regardless if there has been a mousemove. Thus, when clicking a draggable element (without moving the mouse between mousedown and mouseup), draggable:end is fired without draggable:start having been fired.

This has the effect that ng-drag-success is executed on the draggable element as if it had been successfully dropped somewhere, but in fact no droppable element will execute ng-drop-success, as droppable elements only start checking whether anything isTouching them after a draggable:start event.

In my case I am moving an element, so one is removed on ng-drag-success and another one is created on ng-drop-success. When clicking the element, it is removed.

@tafel
Copy link

tafel commented Jan 20, 2016

I just bump again this PR, because it helps me too, with Chromium 47 on laptop. When I first drag the element, all is fine. Then, if I do a simple click on it, without any dragging, the drag-end event is called. This PR resolve this case too. Thanks in advance for merging!

@francoisgrogor
Copy link

Any reason why this has not been incorporated?

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

Successfully merging this pull request may close these issues.

3 participants