Hello guys and let me get straight to the point :) I've run into issue with jumping element when it has a margin and is at the last position in the list.
Please take a look at this exampe - https://jsbin.com/retiqekuha/edit?html,css,js,output
Steps to reproduce
list-group-item and once again try to move last item - also no issue this timeThank you for the help in resolving the issue
Hey! Is anybody taking care of this issue?
+1
I have the exact same issue
Removing line 739 seems to fix the issue, but I'm not sure what other implications of this change would be
I do also have this issue when using 1.6.0, 1.6.6 & 1.5.1. Works fine with 1.4.2.
(I didn't test more/over versions)
Would be great if this can be fixed :)!
I fixed my issue by removing the margin from the draggable items, and replacing it with some other form of styling to create spacing between the items. (Such as a thick transparent border)
I also have a problem of sorting the last item in a list but even without any margin using 1.6.0 or 1.5.1. But, it works fine with 1.4.2.
Removing line 739 seems to fix the issue
@pruik Which line in which version did you remove?
@pruik Which line in which version did you remove?
Oh oops, I used version 1.5.1
if ((el.children.length === 0) || (el.children[0] === ghostEl) ||
(el === evt.target) && (target = _ghostIsLast(el, evt)) <-- This line (and fixing the if-statement)
) {
Looks like latest version 1.7.0 has this fixed, minimized version however returns an error for me.
Thanks.
Indeed, this is now fixed: https://jsbin.com/focozegewe/1/edit?html,css,js,output
Not fixed yet, still have this bug with forceFallback mode in version 1.7.0
Can confirm I'm getting the same bug as well.
Have got two exact fiddles, one is running 1.4.2 the other 1.7.0
Try dragging the last item up in both fiddles, you will see the bug occurs in the fiddle running off 1.7.0:
This worked for me.
Change on line 812 (version 1.7.0)
if (!dragEl.contains(el))
to
if (!dragEl.contains(el) && el.children.length === 0 || el.children.length === 1)
Any updates on this issue? It's still a problem when using the latest version of Vue.Draggable, which uses 1.7.0.
Solved in latest version