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 c258be189f92761f2b8efd3a592195be78f04b0a..357ffcb20829e4c9076ebb450aee47ac0970c667 100644 |
| --- a/ui/login/account_picker/user_pod_row.js |
| +++ b/ui/login/account_picker/user_pod_row.js |
| @@ -1174,6 +1174,9 @@ cr.define('login', function() { |
| */ |
| get mainInput() { |
| if (this.isAuthTypePassword) { |
| + if (this.pinContainer.classList.contains('pin-enabled')) { |
| + return this.pinKeyboard.inputElement; |
| + } |
| return this.passwordElement; |
| } else if (this.isAuthTypeOnlineSignIn) { |
| return this; |
| @@ -1340,11 +1343,15 @@ cr.define('login', function() { |
| this.classList.toggle('signing-in', true); |
| chrome.send('attemptUnlock', [this.user.username]); |
| } else if (this.isAuthTypePassword) { |
| - if (!this.passwordElement.value) |
| + if (!this.passwordElement.value && this.pinKeyboard.inputElement && |
| + !this.pinKeyboard.inputElement.value) |
| return false; |
| Oobe.disableSigninUI(); |
| - chrome.send('authenticateUser', |
| - [this.user.username, this.passwordElement.value]); |
| + // The PIN gets authenticated seperately, so we do not want it to be |
| + // authenticated twice. |
| + if (this.passwordElement.value) |
|
jdufault
2016/07/11 18:19:54
Add {}
Can the PIN submit handler be removed so t
sammiequon
2016/07/11 22:16:25
Done.
|
| + chrome.send('authenticateUser', |
| + [this.user.username, this.passwordElement.value]); |
| } else { |
| console.error('Activating user pod with invalid authentication type: ' + |
| this.authType); |
| @@ -1803,6 +1810,9 @@ 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) { |
| + this.parentNode.setActivatedPod(this); |
| } |
| if (this.multiProfilesPolicyApplied) |
| @@ -3399,6 +3409,7 @@ cr.define('login', function() { |
| if (this.focusedPod_) { |
| var targetTag = e.target.tagName; |
| if (e.target == this.focusedPod_.passwordElement || |
| + e.target == this.focusedPod_.pinKeyboard.inputElement || |
| (targetTag != 'INPUT' && |
| targetTag != 'BUTTON' && |
| targetTag != 'A')) { |