| Index: chrome/browser/resources/settings/controls/settings_input.js
|
| diff --git a/chrome/browser/resources/settings/controls/settings_input.js b/chrome/browser/resources/settings/controls/settings_input.js
|
| index 2b39de17ee3aca1f497743fe5ef522a82f8d7bee..ea075476fe84ae7cda2a7d7c44a5a93eb1072565 100644
|
| --- a/chrome/browser/resources/settings/controls/settings_input.js
|
| +++ b/chrome/browser/resources/settings/controls/settings_input.js
|
| @@ -70,6 +70,11 @@ Polymer({
|
| if (this.$.input.focused)
|
| return;
|
|
|
| + this.setInputValueFromPref_();
|
| + },
|
| +
|
| + /** @private */
|
| + setInputValueFromPref_: function() {
|
| if (this.pref.type == chrome.settingsPrivate.PrefType.NUMBER) {
|
| this.value = this.pref.value.toString();
|
| } else {
|
| @@ -118,6 +123,19 @@ Polymer({
|
| },
|
|
|
| /**
|
| + * Handler for profile name keydowns.
|
| + * @param {!Event} event
|
| + * @private
|
| + */
|
| + onKeydown_: function(event) {
|
| + if (event.key != 'Escape')
|
| + return;
|
| +
|
| + this.setInputValueFromPref_();
|
| + this.$.input.blur();
|
| + },
|
| +
|
| + /**
|
| * @param {boolean} disabled
|
| * @return {boolean} Whether the element should be disabled.
|
| * @private
|
|
|