Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(453)

Unified Diff: ui/webui/resources/js/cr/ui/list.js

Issue 275493006: Files.app: Fix selection on creating new folder (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed the comment Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/file_manager/file_manager/foreground/js/file_manager.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/webui/resources/js/cr/ui/list.js
diff --git a/ui/webui/resources/js/cr/ui/list.js b/ui/webui/resources/js/cr/ui/list.js
index 3f1d1a84f382eaa615053645bd8ed848458a6776..240bd6e901033fe5a4739519fbf9e56efcd87a68 100644
--- a/ui/webui/resources/js/cr/ui/list.js
+++ b/ui/webui/resources/js/cr/ui/list.js
@@ -1121,14 +1121,11 @@ cr.define('cr.ui', function() {
// We don't set the lead or selected properties until after adding all
// items, in case they force relayout in response to these events.
- var listItem = null;
if (leadIndex != -1 && this.cachedItems_[leadIndex])
this.cachedItems_[leadIndex].lead = true;
for (var y = firstIndex; y < lastIndex; y++) {
- if (sm.getIndexSelected(y))
- this.cachedItems_[y].selected = true;
- else if (y != leadIndex)
- listItem = this.cachedItems_[y];
+ if (sm.getIndexSelected(y) != this.cachedItems_[y].selected)
+ this.cachedItems_[y].selected = !this.cachedItems_[y].selected;
}
this.firstIndex_ = firstIndex;
« no previous file with comments | « ui/file_manager/file_manager/foreground/js/file_manager.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698