Index: chrome/browser/resources/ntp/apps.js |
diff --git a/chrome/browser/resources/ntp/apps.js b/chrome/browser/resources/ntp/apps.js |
index 39ef8955130a09e88c38c79e16578ad2e113de55..935eebfd25ad3fa490341cbadb73573b6f18b2df 100644 |
--- a/chrome/browser/resources/ntp/apps.js |
+++ b/chrome/browser/resources/ntp/apps.js |
@@ -524,10 +524,11 @@ var apps = (function() { |
this.scrollMouseXY_ = null; |
}, |
- saveDrag: function() { |
+ saveDrag: function(draggedItem) { |
this.invalidate_(); |
this.layout(); |
+ var draggedAppId = draggedItem.querySelector('a').getAttribute('app-id'); |
var appIds = this.data.filter(function(id) { |
return id != 'web-store-entry'; |
}); |
@@ -535,7 +536,7 @@ var apps = (function() { |
// Wait until the transitions are complete before notifying the browser. |
// Otherwise, the apps will be re-rendered while still transitioning. |
setTimeout(function() { |
- chrome.send('reorderApps', appIds); |
+ chrome.send('reorderApps', [draggedAppId, appIds]); |
}, this.transitionsDuration + 10); |
}, |