mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
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)
This commit is contained in:
parent
15c97e0b76
commit
f1d939bc58
4
ui/jquery.ui.sortable.js
vendored
4
ui/jquery.ui.sortable.js
vendored
@ -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();
|
||||||
|
Loading…
Reference in New Issue
Block a user