diff --git a/knockout-sortable.js b/knockout-sortable.js index 2f98896..f46298e 100644 --- a/knockout-sortable.js +++ b/knockout-sortable.js @@ -157,6 +157,8 @@ // Force knockout to update from.valueHasMutated(); } + // Force deferred tasks to run now, registering the removal + ko.tasks.runEarly(); // Insert the item on its new position to().splice(newIndex, 0, itemVM); // Make sure to tell knockout that we've modified the actual array.