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

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

Issue 2237703004: [MD History] Focus the search bar on load. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
Index: chrome/browser/resources/md_history/history.js
diff --git a/chrome/browser/resources/md_history/history.js b/chrome/browser/resources/md_history/history.js
index 4cce580cc9e8ccc0e21f3930cb76b28bed560a43..3cdf36e700f76ece44be14ce6678996b556ad4e3 100644
--- a/chrome/browser/resources/md_history/history.js
+++ b/chrome/browser/resources/md_history/history.js
@@ -51,6 +51,10 @@ function historyResult(info, results) {
'metricsHandler:recordTime',
['History.ResultsRenderedTime', window.performance.now()]);
});
+
+ // Focus the search field on load. Done here to ensure the history page
+ // is rendered before we try to take focus.
+ $('history-app').focusToolbarSearchField();
}
});
}

Powered by Google App Engine
This is Rietveld 408576698