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..17683131d44210dee02e6bc19281a906ecc46b0b 100644 |
| --- a/ui/login/account_picker/user_pod_row.js |
| +++ b/ui/login/account_picker/user_pod_row.js |
| @@ -702,6 +702,7 @@ cr.define('login', function() { |
| * @private |
| */ |
| userClickAuthAllowed_: false, |
| + pinKeyboardShown_: false, |
|
jdufault
2016/07/08 21:04:09
Add docs.
sammiequon
2016/07/11 17:35:35
Done.
|
| /** @override */ |
| decorate: function() { |
| @@ -1137,6 +1138,7 @@ cr.define('login', function() { |
| currentElement.classList.toggle('pin-enabled', visible); |
| currentElement.classList.toggle('pin-disabled', !visible); |
| } |
| + this.pinKeyboardShown_ = visible; |
|
jdufault
2016/07/08 21:04:09
Can this just be a DOM query so we have less cache
sammiequon
2016/07/11 17:35:35
Done.
|
| }, |
| setUserPodIconType: function(userTypeClass) { |
| @@ -1174,6 +1176,8 @@ cr.define('login', function() { |
| */ |
| get mainInput() { |
| if (this.isAuthTypePassword) { |
| + if (this.pinKeyboardShown_) |
| + return this.pinKeyboard.inputElement; |
| return this.passwordElement; |
| } else if (this.isAuthTypeOnlineSignIn) { |
| return this; |
| @@ -1340,7 +1344,7 @@ 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.value) |
| return false; |
| Oobe.disableSigninUI(); |
| chrome.send('authenticateUser', |
| @@ -1803,6 +1807,8 @@ cr.define('login', function() { |
| // Note that this.userClickAuthAllowed_ is set in mouse down event |
| // handler. |
| this.parentNode.setActivatedPod(this); |
| + } else if (e.target == this.pinKeyboard.submitButton) { |
| + this.parentNode.setActivatedPod(this); |
|
jdufault
2016/07/08 21:04:09
What's this for?
sammiequon
2016/07/11 17:35:35
The error bubble looks for the current activated p
jdufault
2016/07/11 18:19:53
Please add a comment describing this.
|
| } |
| if (this.multiProfilesPolicyApplied) |
| @@ -3399,6 +3405,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')) { |