]> source.dussan.org Git - jquery-ui.git/commitdiff
Draggable: Calling .refreshPositions instead of ._refreshItems when dragging with... 155/head
authorMatt Hoskins <furlined@cat-basket.org>
Mon, 14 Mar 2011 13:53:00 +0000 (06:53 -0700)
committerMatt Hoskins <furlined@cat-basket.org>
Mon, 14 Mar 2011 13:53:00 +0000 (06:53 -0700)
ui/jquery.ui.draggable.js

index 3042401306e261973b9cb6dc495ede033af6e04b..ff1ad13639fb7703426bbe6d6607504fc5fdcf01 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);
                        }
                });