This repository was archived by the owner on Sep 8, 2020. It is now read-only.
This repository was archived by the owner on Sep 8, 2020. It is now read-only.
Horizontal lists work poorly due to a jQuery UI bug. #19
Closed
Description
Horizontal sortable lists work poorly. This is because jQueryUI doesn't detect them as being horizontal.
Due to a bug in jQueryUI (http://bugs.jqueryui.com/ticket/7498), empty lists will never be considered horizontal.
When the sortable is created by Angular, the list is always empty. Thus, never detected as horizontal.
As an ugly workaround, you can set up a start listener to set the floating property manually, and sorting will work smoothly again:
$scope.sortableOptions = {
start: function(e, ui) {
$(e.target).data("ui-sortable").floating = true;
},
};
});
<div ng-model='items' ui-sortable='sortableOptions'>