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

Unified Diff: chrome/browser/resources/settings/about_page/detailed_build_info.js

Issue 2803853002: MD Settings: Restore focus when channel switcher dialog is closed. (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « chrome/browser/resources/settings/about_page/detailed_build_info.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/settings/about_page/detailed_build_info.js
diff --git a/chrome/browser/resources/settings/about_page/detailed_build_info.js b/chrome/browser/resources/settings/about_page/detailed_build_info.js
index 78d22e1e751f3fbafef175a1018f4d5547357793..33a90b780c461c96e70c95628ead4ad30ba2909e 100644
--- a/chrome/browser/resources/settings/about_page/detailed_build_info.js
+++ b/chrome/browser/resources/settings/about_page/detailed_build_info.js
@@ -89,16 +89,12 @@ Polymer({
onChangeChannelTap_: function(e) {
e.preventDefault();
this.showChannelSwitcherDialog_ = true;
- // Async to wait for dialog to appear in the DOM.
- this.async(function() {
- var dialog = this.$$('settings-channel-switcher-dialog');
- // Register listener to detect when the dialog is closed. Flip the boolean
- // once closed to force a restamp next time it is shown such that the
- // previous dialog's contents are cleared.
- dialog.addEventListener('close', function() {
- this.showChannelSwitcherDialog_ = false;
- this.updateChannelInfo_();
- }.bind(this));
- }.bind(this));
+ },
+
+ /** @private */
+ onChannelSwitcherDialogClosed_: function() {
+ this.showChannelSwitcherDialog_ = false;
+ this.$$('paper-button').focus();
+ this.updateChannelInfo_();
stevenjb 2017/04/06 23:08:06 Ahh, much nicer :) Cheers!
},
});
« no previous file with comments | « chrome/browser/resources/settings/about_page/detailed_build_info.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698