aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.draggable.js
diff options
context:
space:
mode:
authorMatt Hoskins <furlined@cat-basket.org>2011-03-14 06:53:00 -0700
committerScott González <scott.gonzalez@gmail.com>2011-03-14 10:51:24 -0400
commit6fcdff13fa4a14dd5427f71f83727b87520349fb (patch)
treebbaae32b674ecfd56a8e2cc752d28031671c39ce /ui/jquery.ui.draggable.js
parent2d6ad068733a18e5b69815192e7c0f5614410c56 (diff)
downloadjquery-ui-6fcdff13fa4a14dd5427f71f83727b87520349fb.tar.gz
jquery-ui-6fcdff13fa4a14dd5427f71f83727b87520349fb.zip
Draggable: Calling .refreshPositions instead of ._refreshItems when dragging with a connected sortable to force containerCache initialisation/update. Fixed: #5563 - connectToSortable misbehaves if the position of the sortable changes after the sortable and draggable have been initialised as _refreshItems no longer updating container cache.(cherry picked from commit 84257e7f0ae20b81b085f1360c15defdd2b89ea9)
Diffstat (limited to 'ui/jquery.ui.draggable.js')
-rw-r--r--ui/jquery.ui.draggable.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/jquery.ui.draggable.js b/ui/jquery.ui.draggable.js
index debdadd22..d27255cac 100644
--- a/ui/jquery.ui.draggable.js
+++ b/ui/jquery.ui.draggable.js
@@ -477,7 +477,7 @@ $.ui.plugin.add("draggable", "connectToSortable", {
instance: sortable,
shouldRevert: sortable.options.revert
});
- sortable._refreshItems(); //Do a one-time refresh at start to refresh the containerCache
+ sortable.refreshPositions(); // Call the sortable's refreshPositions at drag start to refresh the containerCache since the sortable container cache is used in drag and needs to be up to date (this will ensure it's initialised as well as being kept in step with any changes that might have happened on the page).
sortable._trigger("activate", event, uiSortable);
}
});