| 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..b66887af29513d0d4dadfa1d8c5db0a943381e19 100644
|
| --- a/chrome/browser/resources/md_history/history.js
|
| +++ b/chrome/browser/resources/md_history/history.js
|
| @@ -38,8 +38,8 @@ function waitForAppUpgrade() {
|
| */
|
| function historyResult(info, results) {
|
| waitForAppUpgrade().then(function() {
|
| - /** @type {HistoryAppElement} */($('history-app'))
|
| - .historyResult(info, results);
|
| + var app = /** @type {HistoryAppElement} */($('history-app'));
|
| + app.historyResult(info, results);
|
| document.body.classList.remove('loading');
|
|
|
| if (!resultsRendered) {
|
| @@ -51,6 +51,12 @@ 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.
|
| + if (!app.hasDrawer) {
|
| + app.focusToolbarSearchField();
|
| + }
|
| }
|
| });
|
| }
|
|
|