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

Unified Diff: ui/file_manager/file_manager/foreground/js/ui/file_table_list.js

Issue 937343002: Files.app: Prevent flicker of checkmarks on selected items. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/file_manager/foreground/js/ui/file_table_list.js
diff --git a/ui/file_manager/file_manager/foreground/js/ui/file_table_list.js b/ui/file_manager/file_manager/foreground/js/ui/file_table_list.js
index d7c2009ab9a4311016f443f9381a7090228270b1..acf37cdd56d3ea3c6c0cffa6c37ff786c125f7b6 100644
--- a/ui/file_manager/file_manager/foreground/js/ui/file_table_list.js
+++ b/ui/file_manager/file_manager/foreground/js/ui/file_table_list.js
@@ -25,5 +25,14 @@ FileTableList.prototype.__proto__ = cr.ui.table.TableList.prototype;
FileTableList.prototype.mergeItems = function(beginIndex, endIndex) {
cr.ui.table.TableList.prototype.mergeItems.call(this, beginIndex, endIndex);
+ // Make sure that list item's selected attribute is updated just after the
+ // mergeItems operation is done. This prevents checkmarks on selected items
+ // from being animated unintentinally by redraw.
+ for (var i = beginIndex; i < endIndex; i++) {
+ var isSelected = this.selectionModel.getIndexSelected(i);
+ if (this.cachedItems_[i].selected != isSelected)
+ this.cachedItems_[i].selected = isSelected;
+ }
+
this.table.updateHighPriorityRange(beginIndex, endIndex);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698