Chromium Code Reviews| Index: chrome/browser/resources/settings/internet_page/network_apnlist.js |
| diff --git a/chrome/browser/resources/settings/internet_page/network_apnlist.js b/chrome/browser/resources/settings/internet_page/network_apnlist.js |
| index c6270f6b9de1f9f9c1efcb7ab83940ddc85b64c5..afb0015650508cb97947fece95c4d145caf91bab 100644 |
| --- a/chrome/browser/resources/settings/internet_page/network_apnlist.js |
| +++ b/chrome/browser/resources/settings/internet_page/network_apnlist.js |
| @@ -141,9 +141,7 @@ Polymer({ |
| this.apnSelectList_ = result; |
| this.selectedApn_ = |
| (activeApn && activeApn.AccessPointName) || otherApn.AccessPointName; |
| - // We need to flush the DOM here, otherwise the paper-dropdown-menu-light |
|
dpapad
2016/10/17 22:57:05
Native <select> has the same problem described by
stevenjb
2016/10/17 23:10:19
Hrm, yeah, you're right, I need to us async() here
|
| - // will not update to correctly display the selected AccessPointName. |
| - Polymer.dom.flush(); |
| + this.$.selectApn.value = this.selectedApn_; |
| }, |
| /** |
| @@ -177,16 +175,17 @@ Polymer({ |
| /** |
| * Event triggered when the selectApn selection changes. |
| - * @param {!{detail: !{selected: string}}} event |
| + * @param {!{target: !{value: string}}} event |
|
dpapad
2016/10/17 22:57:05
I think the proper way to type annotate this is as
stevenjb
2016/10/17 23:10:19
Sure. Done.
|
| * @private |
| */ |
| onSelectApnChange_: function(event) { |
| - /** @type {string} */ var accessPointName = event.detail.selected; |
| + var accessPointName = event.target.value; |
| // When selecting 'Other', don't set a change event unless a valid |
| // non-default value has been set for Other. |
| if (this.isOtherSelected_(accessPointName) && |
| (!this.otherApn_ || !this.otherApn_.AccessPointName || |
| this.otherApn_.AccessPointName == this.DefaultAccessPointName)) { |
| + this.selectedApn_ = accessPointName; |
| return; |
| } |
| this.sendApnChange_(accessPointName); |