aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormichaelmwu <michaelmwu@gmail.com>2011-03-04 22:17:30 -0800
committerScott González <scott.gonzalez@gmail.com>2011-03-07 08:28:59 -0500
commit20b010640e837cad1ad7203e02b28b399e328725 (patch)
tree35d1442332292958060fa003f17eaf1f5e9999e7
parentbfb5582435bf330b1cbae5953bfa6fbe9747bafe (diff)
downloadjquery-ui-20b010640e837cad1ad7203e02b28b399e328725.tar.gz
jquery-ui-20b010640e837cad1ad7203e02b28b399e328725.zip
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)(cherry picked from commit f1d939bc589fd8d211e0dc540f7d92cfae94a411)
-rw-r--r--ui/jquery.ui.sortable.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/jquery.ui.sortable.js b/ui/jquery.ui.sortable.js
index a48350f27..15b6b8113 100644
--- a/ui/jquery.ui.sortable.js
+++ b/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();