Chromium Code Reviews| 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..35697a7ee3c3f2afb889f5e7ac2d9e7ecd8b4105 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) { |
|
jdufault
2016/07/18 18:17:26
nit: space after if before (
sammiequon
2016/07/18 18:49:36
Done.
|
| + 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) |