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

Unable to put an item back to its original spot when forceFallback: true #1305

Closed
kevinzang opened this issue Apr 4, 2018 · 2 comments
Closed

Comments

@kevinzang
Copy link

kevinzang commented Apr 4, 2018

http://jsbin.com/jozakuqesi/1/edit?html,css,js,output

In one motion, drag item "bar 1" to the other list, and then try to drag it back to its original spot. It is not possible in one motion, but it works if you drop first in the other list, then drag it again to the original spot.

In this case, I noticed _ghostIsLast returns false when withFallback: true, but returns true when withFallback: false, but I am not sure if this is the root cause of this bug. Another suspect is the if (el.children.length === 0) check. That looks like it is trying to check "if the sortable list is empty", but in this case the list is not actually empty because it contains invisible clone element as well as fixed position fallback element.

@tplk
Copy link

tplk commented Apr 25, 2018

Same here, what can be done to fix this?

@owen-m1
Copy link
Member

owen-m1 commented Jan 15, 2019

Solved in 1.8.0, using emptyInsertThreshold option

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

3 participants