Reputation: 190
I have two sortable lists next to each other.
See this example: http://jsfiddle.net/2Fbt6/
If you drag "Item 6" to the right, it gets added to the second last position instead to the last. If you drag "Item 6" to the right, to the left, and again to the right, it's correct.
Code:
HTML:
<div class="categories">
<ul class="items">
<li id="item1" class="item ui-state-default">Item 1</li>
<li id="item2" class="item ui-state-default">Item 2</li>
<li id="item3" class="item ui-state-default">Item 3</li>
<li id="item4" class="item ui-state-default">Item 4</li>
<li id="item5" class="item ui-state-default">Item 5</li>
<li id="item6" class="item ui-state-default">Item 6</li>
</ul>
<ul class="items" style="background: #efefef;">
<li id="item5" class="item ui-state-default">Item 1</li>
<li id="item6" class="item ui-state-default">Item 2</li>
<li id="item7" class="item ui-state-default">Item 3</li>
</ul>
</div>
CSS:
.items { width: 100px; float: left; height: 500px;list-style-type: none;}
.placeholder { height: 18px; background-color: #ffd;}
JS:
$( ".items" ).sortable({
connectWith: ".items",
placeholder: 'placeholder'
});
$( ".categories" ).sortable({
connectWith: ".categories"
});
I'd be pleased if anybody could think of a workaround for this issue. In my case, the left list may be very long, and it's annoying, if a user has to scroll up all the way, to drag the element to the last position of the right list.
EDIT:
Seems like this is a bug in jQuery-ui that will be addressed in version 1.11: http://bugs.jqueryui.com/ticket/9314
Upvotes: 1
Views: 1723
Reputation: 190
Seems like this is a bug in jQuery-ui that will be addressed in version 1.11: http://bugs.jqueryui.com/ticket/9314
Upvotes: 4