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

Unified Diff: chrome/browser/resources/history/history.js

Issue 1090783002: Focus the history group that was clicked. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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: chrome/browser/resources/history/history.js
diff --git a/chrome/browser/resources/history/history.js b/chrome/browser/resources/history/history.js
index 13ec12b636fec138bef864ad7558e6653eb3caec..8cfb2f8174496419691e2fe238fa70be527a07af 100644
--- a/chrome/browser/resources/history/history.js
+++ b/chrome/browser/resources/history/history.js
@@ -1802,6 +1802,16 @@ HistoryView.prototype.toggleGroupedVisits_ = function(e) {
}
entry.classList.toggle('expand');
+
+ var row = entry.querySelector('.site-domain-wrapper');
+ var activeRows =
+ this.resultDiv_.getElementsByClassName(cr.ui.FocusRow.ACTIVE_CLASS);
+ for (var i = 0; i < activeRows.length; ++i) {
+ if (activeRows[i] != row) // Ignore |row| to avoid flicker.
+ activeRows[i].makeActive(false);
+ }
+ row.makeActive(true);
+
this.updateFocusGrid_();
};
« 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