Chromium Code Reviews| Index: chrome/browser/resources/settings/people_page/fingerprint_list.js |
| diff --git a/chrome/browser/resources/settings/people_page/fingerprint_list.js b/chrome/browser/resources/settings/people_page/fingerprint_list.js |
| index 442c53cc2187584284fe732e2a87b0770160d047..54e76257b7735ee334578f002ea6a17b813b0cb8 100644 |
| --- a/chrome/browser/resources/settings/people_page/fingerprint_list.js |
| +++ b/chrome/browser/resources/settings/people_page/fingerprint_list.js |
| @@ -31,7 +31,10 @@ Polymer({ |
| value: function() { |
| return []; |
| } |
| - } |
| + }, |
| + |
| + /** @private */ |
| + showSetupFingerprintDialog_: Boolean, |
| }, |
| /** @private {?settings.FingerprintBrowserProxy} */ |
| @@ -145,11 +148,17 @@ Polymer({ |
| * @private |
| */ |
| openAddFingerprintDialog_: function() { |
| - this.$.setupFingerprint.open(); |
| + this.showSetupFingerprintDialog_ = true; |
| + this.async(function() { |
| + var dialog = this.$$('settings-setup-fingerprint-dialog'); |
| + dialog.addEventListener('close', |
| + this.onSetupFingerprintDialogClose_.bind(this)); |
|
stevenjb
2017/06/01 17:28:24
Instead of this, does this work in the HTML for th
dpapad
2017/06/01 17:48:44
+1. We've been following the on-close= approach in
sammiequon
2017/06/01 20:21:10
Done.
|
| + }.bind(this)); |
| }, |
| /** @private */ |
| onSetupFingerprintDialogClose_: function() { |
| + this.showSetupFingerprintDialog_ = false; |
| cr.ui.focusWithoutInk(assert(this.$$('#addFingerprint'))); |
| this.browserProxy_.startAuthentication(); |
| }, |
| @@ -162,7 +171,7 @@ Polymer({ |
| onScreenLocked_: function(screenIsLocked) { |
| if (!screenIsLocked && |
| settings.getCurrentRoute() == settings.Route.FINGERPRINT) { |
| - this.$.setupFingerprint.close(); |
| + this.onSetupFingerprintDialogClose_(); |
| } |
| }, |
| }); |