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

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

Issue 2131823004: Dialog message saying PIN is incorrect positioned correctly. (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 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')) {
« 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