| Index: chrome/browser/resources/settings/search_engines_page/search_engine_dialog.js
|
| diff --git a/chrome/browser/resources/settings/search_engines_page/search_engine_dialog.js b/chrome/browser/resources/settings/search_engines_page/search_engine_dialog.js
|
| index 7f36e61e898c67708316f69c42b891636ee340be..bf275f9ac548d4c2b67bf3c21e3443c3407f8cfc 100644
|
| --- a/chrome/browser/resources/settings/search_engines_page/search_engine_dialog.js
|
| +++ b/chrome/browser/resources/settings/search_engines_page/search_engine_dialog.js
|
| @@ -98,6 +98,14 @@ Polymer({
|
| validate_: function(event) {
|
| var inputElement = Polymer.dom(event).localTarget;
|
|
|
| + // If element is empty, disable the action button, but don't show the red
|
| + // invalid message.
|
| + if (inputElement.value == '') {
|
| + inputElement.invalid = false;
|
| + this.updateActionButtonState_();
|
| + return;
|
| + }
|
| +
|
| this.browserProxy_.validateSearchEngineInput(
|
| inputElement.id, inputElement.value).then(function(isValid) {
|
| inputElement.invalid = !isValid;
|
| @@ -110,7 +118,7 @@ Polymer({
|
| var allValid = [
|
| this.$.searchEngine, this.$.keyword, this.$.queryUrl
|
| ].every(function(inputElement) {
|
| - return !inputElement.invalid && inputElement.value.length != 0;
|
| + return !inputElement.invalid && inputElement.value.length > 0;
|
| });
|
| this.$.actionButton.disabled = !allValid;
|
| },
|
|
|