| Index: chrome/browser/resources/settings/appearance_page/home_url_input.js
|
| diff --git a/chrome/browser/resources/settings/controls/settings_input.js b/chrome/browser/resources/settings/appearance_page/home_url_input.js
|
| similarity index 91%
|
| rename from chrome/browser/resources/settings/controls/settings_input.js
|
| rename to chrome/browser/resources/settings/appearance_page/home_url_input.js
|
| index 52c81984c265ab69e2797f8913c6d07870244aa6..6733e083a2902fe8a6805ea63b5c7b240b4287b1 100644
|
| --- a/chrome/browser/resources/settings/controls/settings_input.js
|
| +++ b/chrome/browser/resources/settings/appearance_page/home_url_input.js
|
| @@ -4,11 +4,11 @@
|
|
|
| /**
|
| * @fileoverview
|
| - * `settings-input` is a single-line text field for user input associated
|
| - * with a pref value.
|
| + * `home-url-input` is a single-line text field intending to be used with
|
| + * prefs.homepage
|
| */
|
| Polymer({
|
| - is: 'settings-input',
|
| + is: 'home-url-input',
|
|
|
| behaviors: [CrPolicyPrefBehavior, PrefControlBehavior],
|
|
|
| @@ -115,15 +115,10 @@ Polymer({
|
| */
|
| onKeydown_: function(event) {
|
| // If pressed enter when input is invalid, do not trigger on-change.
|
| - if (event.key == 'Enter' && this.invalid) {
|
| + if (event.key == 'Enter' && this.invalid)
|
| event.preventDefault();
|
| - return;
|
| - }
|
| -
|
| - if (event.key != 'Escape')
|
| - return;
|
| -
|
| - this.resetValue_();
|
| + else if (event.key == 'Escape')
|
| + this.resetValue_();
|
| },
|
|
|
| /**
|
|
|