]> source.dussan.org Git - jquery-ui.git/commitdiff
Draggable: Calling .refreshPositions instead of ._refreshItems when dragging with...
authorMatt Hoskins <furlined@cat-basket.org>
Mon, 14 Mar 2011 13:53:00 +0000 (06:53 -0700)
committerScott González <scott.gonzalez@gmail.com>
Mon, 14 Mar 2011 14:51:24 +0000 (10:51 -0400)
ui/jquery.ui.draggable.js

index debdadd228fa02b6af281ca86c3e7ee66b158bba..d27255cac6af3ee829fa26911b9b8fda4f3f82df 100644 (file)
@@ -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);
                        }
                });