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

Bug with deep hierarchies #7

Closed
ghost opened this issue Oct 23, 2013 · 2 comments
Closed

Bug with deep hierarchies #7

ghost opened this issue Oct 23, 2013 · 2 comments

Comments

@ghost
Copy link

ghost commented Oct 23, 2013

When the dragged item has several DIVs, it is dragging the internal DIV, not the external one.

The reason is that dragstart function is not propagating the "el" element passed to it.

The fix is simply:

dragstart = (evt) ->
evt.preventDefault()
new DragDrop(evt)

should be:

dragstart = (evt, el) ->
evt.preventDefault()
new DragDrop(evt, el)

@timruffles
Copy link
Owner

Thanks! Will add and merge.

On Wednesday, 23 October 2013, Joshua-Smith wrote:

When the dragged item has several DIVs, it is dragging the internal DIV,
not the external one.

The reason is that dragstart function is not propagating the "el" element
passed to it.

The fix is simply:

dragstart = (evt) ->
evt.preventDefault()
new DragDrop(evt)

should be:

dragstart = (evt, el) ->
evt.preventDefault()
new DragDrop(evt, el)


Reply to this email directly or view it on GitHubhttps://github.com//issues/7
.

timruffles added a commit that referenced this issue Oct 28, 2013
@timruffles
Copy link
Owner

Can't believe this one. Code goes to all that trouble to find the draggable parent, then I just drop it on the floor :D

Thanks, fixed.

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