Skip to content

Commit

Permalink
Sortable: Changed floating calculation to determine also whether item…
Browse files Browse the repository at this point in the history
…s are being displayed horizontally. Helps fix odd sorting behavior for horizontal lists. Fixed #6702 - horizontal sortable not working (and solution)(cherry picked from commit f1d939b)
  • Loading branch information
michaelmwu authored and scottgonzalez committed Mar 7, 2011
1 parent bfb5582 commit 20b0106
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ui/jquery.ui.sortable.js
Expand Up @@ -49,8 +49,8 @@ $.widget("ui.sortable", $.ui.mouse, {
//Get the items //Get the items
this.refresh(); this.refresh();


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

0 comments on commit 20b0106

Please sign in to comment.