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

Unified Diff: chrome/browser/resources/md_history/app.crisper.js

Issue 2369823002: MD History: Focus the search field on load without 'showing' it (Closed)
Patch Set: Closure Created 4 years, 3 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/app.crisper.js
diff --git a/chrome/browser/resources/md_history/app.crisper.js b/chrome/browser/resources/md_history/app.crisper.js
index e6c08baa1f5371681f39411a52f209fb17b4ecca..7f6560e203ad383ad576741be859fbea950472b6 100644
--- a/chrome/browser/resources/md_history/app.crisper.js
+++ b/chrome/browser/resources/md_history/app.crisper.js
@@ -5401,8 +5401,9 @@ Polymer({
setTimeout(function() {
chrome.send('metricsHandler:recordTime', [ 'History.ResultsRenderedTime', window.performance.now() ]);
});
- if (!this.hasDrawer_) {
- this.focusToolbarSearchField();
+ var searchField = this.$.toolbar.searchField;
+ if (!searchField.narrow) {
+ searchField.getSearchInput().focus();
}
md_history.ensureLazyLoaded();
},
« no previous file with comments | « chrome/browser/resources/md_history/app.js ('k') | chrome/test/data/webui/md_history/history_toolbar_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698