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

Unified Diff: chrome/browser/resources/settings/controls/settings_input.js

Issue 2777343005: MD Settings: minor cleanup for settings-input (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3796fdecfc542cf9eb965d798c2d8aa0f1901fbd..0031a07e242dfa2b87d8bc63595c1096e5a00f19 100644
--- a/chrome/browser/resources/settings/controls/settings_input.js
+++ b/chrome/browser/resources/settings/controls/settings_input.js
@@ -112,15 +112,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_();
},
/**
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698