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

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

Issue 2856023002: MD Settings: Internet: Fix IP config visibility (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
Index: chrome/browser/resources/settings/internet_page/internet_detail_page.js
diff --git a/chrome/browser/resources/settings/internet_page/internet_detail_page.js b/chrome/browser/resources/settings/internet_page/internet_detail_page.js
index 2023e3b349853b7214549a3a8b9e3dc7a8931322..1d7a6e1f118e8f45b3c25aee693d05db5c8a45db 100644
--- a/chrome/browser/resources/settings/internet_page/internet_detail_page.js
+++ b/chrome/browser/resources/settings/internet_page/internet_detail_page.js
@@ -222,15 +222,18 @@ Polymer({
// Update the detail page title.
this.parentNode.pageTitle = CrOnc.getNetworkName(this.networkProperties);
+ if (this.didSetFocus_)
+ return;
+
// Focus a button once the initial state is set.
- if (!this.didSetFocus_) {
+ this.async(function() {
this.didSetFocus_ = true;
var button = this.$$('#buttonDiv .primary-button:not([hidden])');
if (!button)
button = this.$$('#buttonDiv .secondary-button:not([hidden])');
assert(button); // At least one button will always be visible.
button.focus();
- }
+ }.bind(this));
},
/** @private */
@@ -937,17 +940,6 @@ Polymer({
},
/**
- * @param {!CrOnc.NetworkProperties} networkProperties
- * @return {boolean}
- * @private
- */
- showIpConfig_: function(networkProperties) {
- if (!this.isRememberedOrConnected_(networkProperties))
- return false;
- return !!networkProperties.IPAddressConfigType;
- },
-
- /**
* @param {!Object} curValue
* @param {!Object} newValue
* @return {boolean} True if all properties set in |newValue| are equal to

Powered by Google App Engine
This is Rietveld 408576698