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

Unified Diff: chrome/browser/resources/settings/people_page/sync_page.js

Issue 2941433002: MD Settings: fix auto-focus on sync page. (Closed)
Patch Set: feedback Created 3 years, 6 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/settings/people_page/sync_page.js
diff --git a/chrome/browser/resources/settings/people_page/sync_page.js b/chrome/browser/resources/settings/people_page/sync_page.js
index 8078686bd65191aa99cdd123b62bb0a8c771bf77..f40443683c14778d248e885168ac19ba116c5af8 100644
--- a/chrome/browser/resources/settings/people_page/sync_page.js
+++ b/chrome/browser/resources/settings/people_page/sync_page.js
@@ -216,8 +216,8 @@ Polymer({
// Focus the password input box if password is needed to start sync.
if (this.syncPrefs.passphraseRequired) {
- // Async to allow the dom-if templates to render first.
- this.async(function() {
+ // Wait for the dom-if templates to render and subpage to become visible.
+ listenOnce(document, 'show-container', function() {
var input = /** @type {!PaperInputElement} */ (
this.$$('#existingPassphraseInput'));
input.inputElement.focus();

Powered by Google App Engine
This is Rietveld 408576698