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

Unified Diff: chrome/browser/resources/settings/people_page/users_add_user_dialog.js

Issue 2533173002: MD Settings: Listen to the Enter key in the Add User ChromeOS dialog. (Closed)
Patch Set: address comments Created 4 years 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 | « chrome/browser/resources/settings/people_page/users_add_user_dialog.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/settings/people_page/users_add_user_dialog.js
diff --git a/chrome/browser/resources/settings/people_page/users_add_user_dialog.js b/chrome/browser/resources/settings/people_page/users_add_user_dialog.js
index 2bc985478053acf365333c18b943d9021623deef..b1383ee9516280b2881e0e9f6cc00562bc85b9ab 100644
--- a/chrome/browser/resources/settings/people_page/users_add_user_dialog.js
+++ b/chrome/browser/resources/settings/people_page/users_add_user_dialog.js
@@ -57,7 +57,9 @@ Polymer({
/** @private */
addUser_: function() {
- assert(this.validate_());
+ // May be submitted by the Enter key even if the input value is invalid.
+ if (!this.validate_())
+ return;
var input = this.$.addUserInput.value;
« no previous file with comments | « chrome/browser/resources/settings/people_page/users_add_user_dialog.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698