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

After migration from v1.7 to v1.8.4 moving items with display:none has strange behavior #1475

Closed
DenitsaGencheva opened this issue Mar 26, 2019 · 1 comment
Labels

Comments

@DenitsaGencheva
Copy link

DenitsaGencheva commented Mar 26, 2019

Problem:

We use sortable extensively in our project for moving card components into different sections.
In one of the sections, the behavior is more of a dragover and drop inside the hovered element. That is why the ghost class is styled with 'display:none'. Dragging on top of the different elements (projects) was working without issue in v1.7. Now the card is added to the list, but sometimes it gets stuck at the bottom. Usually, this happens when I drag from bottom to top on the projects list.
We managed to improve the behavior by changing the style for the ghost class to:

width: 10px; height: 10px; margin-bottom: -10px;

I guess this is due to adding the new properties described here: https://github.com/SortableJS/Sortable/wiki/Swap-Thresholds-and-Direction#swap-threshold
but i can't figure out how to make it work with tweaking them.

Thank you in advance for looking into this!

JSBin/JSFiddle demonstrating the problem:

https://jsbin.com/qahuxaz/edit

@owen-m1
Copy link
Member

owen-m1 commented Mar 26, 2019

@DenitsaGencheva Should be solved in commit above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants