aboutsummaryrefslogtreecommitdiffstats
path: root/themes/default/js/ui/jquery.ui.droppable.js
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--themes/default/js/ui/jquery.ui.droppable.js19
1 files changed, 15 insertions, 4 deletions
diff --git a/themes/default/js/ui/jquery.ui.droppable.js b/themes/default/js/ui/jquery.ui.droppable.js
index 62bd7b0e5..461f5e597 100644
--- a/themes/default/js/ui/jquery.ui.droppable.js
+++ b/themes/default/js/ui/jquery.ui.droppable.js
@@ -1,5 +1,5 @@
/*
- * jQuery UI Droppable 1.8.10
+ * jQuery UI Droppable 1.8.16
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
@@ -147,7 +147,7 @@ $.widget("ui.droppable", {
});
$.extend($.ui.droppable, {
- version: "1.8.10"
+ version: "1.8.16"
});
$.ui.intersect = function(draggable, droppable, toleranceMode) {
@@ -212,11 +212,11 @@ $.ui.ddmanager = {
for (var j=0; j < list.length; j++) { if(list[j] == m[i].element[0]) { m[i].proportions.height = 0; continue droppablesLoop; } }; //Filter out elements in the current dragged item
m[i].visible = m[i].element.css("display") != "none"; if(!m[i].visible) continue; //If the element is not visible, continue
+ if(type == "mousedown") m[i]._activate.call(m[i], event); //Activate the droppable if used directly from draggables
+
m[i].offset = m[i].element.offset();
m[i].proportions = { width: m[i].element[0].offsetWidth, height: m[i].element[0].offsetHeight };
- if(type == "mousedown") m[i]._activate.call(m[i], event); //Activate the droppable if used directly from draggables
-
}
},
@@ -238,6 +238,12 @@ $.ui.ddmanager = {
return dropped;
},
+ dragStart: function( draggable, event ) {
+ //Listen for scrolling so that if the dragging causes scrolling the position of the droppables can be recalculated (see #5003)
+ draggable.element.parents( ":not(body,html)" ).bind( "scroll.droppable", function() {
+ if( !draggable.options.refreshPositions ) $.ui.ddmanager.prepareOffsets( draggable, event );
+ });
+ },
drag: function(draggable, event) {
//If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse.
@@ -279,6 +285,11 @@ $.ui.ddmanager = {
}
});
+ },
+ dragStop: function( draggable, event ) {
+ draggable.element.parents( ":not(body,html)" ).unbind( "scroll.droppable" );
+ //Call prepareOffsets one final time since IE does not fire return scroll events when overflow was caused by drag (see #5003)
+ if( !draggable.options.refreshPositions ) $.ui.ddmanager.prepareOffsets( draggable, event );
}
};