aboutsummaryrefslogtreecommitdiffstats
path: root/themes/default/js/ui/jquery.ui.sortable.js
diff options
context:
space:
mode:
Diffstat (limited to 'themes/default/js/ui/jquery.ui.sortable.js')
-rw-r--r--themes/default/js/ui/jquery.ui.sortable.js14
1 files changed, 9 insertions, 5 deletions
diff --git a/themes/default/js/ui/jquery.ui.sortable.js b/themes/default/js/ui/jquery.ui.sortable.js
index 9665b77dd..2c94cb14b 100644
--- a/themes/default/js/ui/jquery.ui.sortable.js
+++ b/themes/default/js/ui/jquery.ui.sortable.js
@@ -1,5 +1,5 @@
/*
- * jQuery UI Sortable 1.8.10
+ * jQuery UI Sortable 1.8.16
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
@@ -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 ? o.axis === 'x' || (/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();
@@ -615,6 +615,10 @@ $.widget("ui.sortable", $.ui.mouse, {
for (var i = this.items.length - 1; i >= 0; i--){
var item = this.items[i];
+ //We ignore calculating positions of all connected containers when we're not over them
+ if(item.instance != this.currentContainer && this.currentContainer && item.item[0] != this.currentItem[0])
+ continue;
+
var t = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item;
if (!fast) {
@@ -980,7 +984,7 @@ $.widget("ui.sortable", $.ui.mouse, {
// We first have to update the dom position of the actual currentItem
// Note: don't do it if the current item is already removed (by a user), or it gets reappended (see #4088)
- if(!this._noFinalSort && this.currentItem[0].parentNode) this.placeholder.before(this.currentItem);
+ if(!this._noFinalSort && this.currentItem.parent().length) this.placeholder.before(this.currentItem);
this._noFinalSort = null;
if(this.helper[0] == this.currentItem[0]) {
@@ -1067,7 +1071,7 @@ $.widget("ui.sortable", $.ui.mouse, {
});
$.extend($.ui.sortable, {
- version: "1.8.10"
+ version: "1.8.16"
});
})(jQuery);