Skip to content

Commit f1d939b

Browse files
committed
Sortable: Changed floating calculation to determine also whether items are being displayed horizontally. Helps fix odd sorting behavior for horizontal lists. Fixed #6702 - horizontal sortable not working (and solution)
1 parent 15c97e0 commit f1d939b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ui/jquery.ui.sortable.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ $.widget("ui.sortable", $.ui.mouse, {
4949
//Get the items
5050
this.refresh();
5151

52-
//Let's determine if the items are floating
53-
this.floating = this.items.length ? (/left|right/).test(this.items[0].item.css('float')) : false;
52+
//Let's determine if the items are being displayed horizontally
53+
this.floating = this.items.length ? (/left|right/).test(this.items[0].item.css('float')) || (/inline|table-cell/).test(this.items[0].item.css('display')) : false;
5454

5555
//Let's determine the parent's offset
5656
this.offset = this.element.offset();

0 commit comments

Comments
 (0)