[x] Bug reports containing repro steps are likely to be fixed faster
[x] Feature requests should be multi-purpose, describe use cases
[x] For support requests or questions, please refer to our Slack channel
Repro steps:
1) Open second sample on https://bevacqua.github.io/dragula/ (with events)
2) Change dragula([$('left-events'), $('right-events')]) to dragula([$('left-events'), $('right-events')], { copy: true }), and add subscription to 'cancel' event
3) Try to drag last item in the left column bit lower in bounds of its container and release - no cancel event raised
Reason: _copy is not in the dom, so getParent(_copy) returns null, and then isInitialPlacement returns false, and we go to drake.emit('drop', item, null.
Because of this bug there is no way to distinguish two situations:
1) Item was moved out of the container
2) Item moved inside the container
In the second case we should get 'cancel' event, but actually, in both cases we get 'drop" event with target = null.
Repro steps: 1) Open second sample on https://bevacqua.github.io/dragula/ (with events) 2) Change
dragula([$('left-events'), $('right-events')])
todragula([$('left-events'), $('right-events')], { copy: true })
, and add subscription to 'cancel' event 3) Try to drag last item in the left column bit lower in bounds of its container and release - no cancel event raisedReason: _copy is not in the dom, so getParent(_copy) returns null, and then isInitialPlacement returns false, and we go to
drake.emit('drop', item, null
.Because of this bug there is no way to distinguish two situations: 1) Item was moved out of the container 2) Item moved inside the container
In the second case we should get 'cancel' event, but actually, in both cases we get 'drop" event with target = null.