Reputation: 29557
I am using jQuery's sortable to move elements between two lists.
My issue is that the list shifts (all the elements down, then back up) when I drag an element. This seems to happen only when there is text (or another element) inside the sortable element.
In this example http://jsfiddle.net/vrCC7/2/:
Code:
<div id = "containment">
<ul class = "sortable connectedSortable" >
<li class = "child">1</li>
<li class = "child">2</li>
<li class = "child">3</li>
</ul>
<ul class = "sortable connectedSortable" >
<li class = "child"></li>
<li class = "child"></li>
<li class = "child"></li>
</ul>
</div>
Upvotes: 2
Views: 2975
Reputation: 5458
For me, the problem came from css overflow on list :
ul {
overflow: auto;
}
Upvotes: 0
Reputation: 60493
just add a
vertical-align:bottom;
in child class seems to do the trick.
see jsFiddle
Upvotes: 4