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

Unified Diff: chrome/browser/resources/settings/internet_page/network_siminfo.js

Issue 2817803002: MD Settings: CrOS: Focus elements on dialog close (Closed)
Patch Set: rebase 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
Index: chrome/browser/resources/settings/internet_page/network_siminfo.js
diff --git a/chrome/browser/resources/settings/internet_page/network_siminfo.js b/chrome/browser/resources/settings/internet_page/network_siminfo.js
index 8772be4c69a704c9089385d36108a00133f9b818..9d8b710ebfa789e707cdcff9beca99b523a96684 100644
--- a/chrome/browser/resources/settings/internet_page/network_siminfo.js
+++ b/chrome/browser/resources/settings/internet_page/network_siminfo.js
@@ -99,8 +99,7 @@ Polymer({
if (!showUnlockPuk)
return;
- this.error_ = ErrorType.NONE;
- this.$.unlockPukDialog.showModal();
+ this.showUnlockPukDialog_();
},
/**
@@ -220,17 +219,13 @@ Polymer({
}.bind(this));
},
- /**
- * Opens the Unlock PUK dialog.
- * @param {Event} event
- * @private
- */
- unlockPuk_: function(event) {
+ /** @private */
+ showUnlockPukDialog_: function() {
this.error_ = ErrorType.NONE;
- this.$.unlockPukDialog.showModal();
this.$.unlockPuk.value = '';
this.$.unlockPin1.value = '';
this.$.unlockPin2.value = '';
+ this.$.unlockPukDialog.showModal();
},
/**
@@ -342,6 +337,21 @@ Polymer({
return false;
}
return true;
- }
+ },
+
+ /** @private */
+ onEnterPinDialogClosed_: function() {
+ this.$$('#simLockButton').focus();
+ },
+
+ /** @private */
+ onChangePinDialogClose_: function() {
+ this.$$('#changePinButton').focus();
+ },
+
+ /** @private */
+ onUnlockPinDialogClose_: function() {
+ this.$$('#unlockPinButton').focus();
+ },
});
})();

Powered by Google App Engine
This is Rietveld 408576698