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

Unified Diff: ui/login/account_picker/user_pod_row.js

Issue 2157533002: Submit button on not working. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Fixed patch set 2 errors. Created 4 years, 5 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 | « chrome/browser/resources/chromeos/quick_unlock/pin_keyboard.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/login/account_picker/user_pod_row.js
diff --git a/ui/login/account_picker/user_pod_row.js b/ui/login/account_picker/user_pod_row.js
index 912c21b627800894d98c375437371600261c3cf5..bd3b1650ea5f5c920ae14919fa7a5b35af03dab8 100644
--- a/ui/login/account_picker/user_pod_row.js
+++ b/ui/login/account_picker/user_pod_row.js
@@ -712,6 +712,11 @@ cr.define('login', function() {
this.addEventListener('click', this.handleClickOnPod_.bind(this));
this.addEventListener('mousedown', this.handlePodMouseDown_.bind(this));
+ if (this.pinKeyboard) {
+ this.pinKeyboard.addEventListener('submit',
+ this.handlePinSubmitted_.bind(this));
+ }
+
this.actionBoxAreaElement.addEventListener('mousedown',
stopEventPropagation);
this.actionBoxAreaElement.addEventListener('click',
@@ -1791,6 +1796,15 @@ cr.define('login', function() {
},
/**
+ * Handles click event on submit button on the pin keyboard.
+ * @param {Event} e Click event.
+ */
+ handlePinSubmitted_: function(e) {
+ if (this.parentNode.isFocused(this))
+ this.parentNode.setActivatedPod(this);
+ },
+
+ /**
* Handles click event on a user pod.
* @param {Event} e Click event.
*/
@@ -1805,11 +1819,6 @@ cr.define('login', function() {
// Note that this.userClickAuthAllowed_ is set in mouse down event
// handler.
this.parentNode.setActivatedPod(this);
- } else if (this.pinKeyboard.submitButton &&
- e.target == this.pinKeyboard.submitButton) {
- // Sets the pod as activated if the submit button is clicked so that
- // it simulates what the enter button does for the password/pin.
- this.parentNode.setActivatedPod(this);
}
if (this.multiProfilesPolicyApplied)
« no previous file with comments | « chrome/browser/resources/chromeos/quick_unlock/pin_keyboard.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698