Skip to content
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)(cherry picked from commit f1d939b)
  • Loading branch information...
1 parent bfb5582 commit 20b010640e837cad1ad7203e02b28b399e328725 @michaelmwu michaelmwu committed with scottgonzalez Mar 4, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 ui/jquery.ui.sortable.js
View
4 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 20b0106

Please sign in to comment.
Something went wrong with that request. Please try again.