Skip to content
Permalink
Browse files

Sortable: Changed floating calculation to determine also whether item…

…s are being displayed horizontally. Helps fix odd sorting behavior for horizontal lists. Fixed #6702 - horizontal sortable not working (and solution)
  • Loading branch information
michaelmwu committed Mar 5, 2011
1 parent 15c97e0 commit f1d939bc589fd8d211e0dc540f7d92cfae94a411
Showing with 2 additions and 2 deletions.
  1. +2 −2 ui/jquery.ui.sortable.js
@@ -49,8 +49,8 @@ $.widget("ui.sortable", $.ui.mouse, {
//Get the items
this.refresh();

//Let's determine if the items are floating
this.floating = this.items.length ? (/left|right/).test(this.items[0].item.css('float')) : false;
//Let's determine if the items are being displayed horizontally
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;

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

0 comments on commit f1d939b

Please sign in to comment.
You can’t perform that action at this time.