Skip to content

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

@DenitsaGencheva

Description

@DenitsaGencheva

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions