rhwilr/vue-nestable

Item nesting on first drag

nagbg opened this issue · 4 comments

nagbg commented

When the page is reloaded the first drag will directly nest on the previous item. If there is a second drag it will not have the same behavior and on nest if dragged to the right.
Tested this in both Safari and Chrome.

If the nestable-handle has a @click function inside this will be called on drag end if the drag ends in the same position as start on Chrome (not safari). If the item is moved the function is not called. In my opinion the click function should never be called if the item is draged.

Thanks for reporting this issue.

When the page is reloaded the first drag will directly nest on the previous item.

I can reproduce this issue and will look into it.

If the nestable-handle has a @click function inside this will be called on drag end.

I'm not handling click events in this plugin. I suspect this is a normal browser behavior. I'll take a look at this, but I'm not sure if I can or should do something about this.

nagbg commented

The click function can be handled in the @change event. So this I can solve myself. It's just that it's inconsistent behavior across browsers.

I just released v2.4.1, which fixes the first issue.

Regarding the click event, I'm probably not going to change this, since it is browser dependent and it is not the focus of this package to fix this.

nagbg commented

I tested it on my project and the bug has been fixed for my use case. Thank you.
If your demo page has been updated I found another bug with similar problem.
If you first do a drag in the left list under "draggle across different lists" and then do a drag under the right list the item will directly nest under the previous item.