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

Side by Side Diff: ui/login/account_picker/user_pod_row.js

Issue 2132753002: When pin-keyboard comes up the input element is of focus. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « ui/login/account_picker/user_pod_row.css ('k') | ui/login/screen_container.css » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview User pod row implementation. 6 * @fileoverview User pod row implementation.
7 */ 7 */
8 8
9 cr.define('login', function() { 9 cr.define('login', function() {
10 /** 10 /**
(...skipping 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after
1130 1130
1131 setPinVisibility: function(visible) { 1131 setPinVisibility: function(visible) {
1132 var elements = [this, this.authElement, this.imageElement, 1132 var elements = [this, this.authElement, this.imageElement,
1133 this.signInElement, this.pinContainer]; 1133 this.signInElement, this.pinContainer];
1134 1134
1135 for (var idx = 0; idx < elements.length; idx++) { 1135 for (var idx = 0; idx < elements.length; idx++) {
1136 var currentElement = elements[idx]; 1136 var currentElement = elements[idx];
1137 currentElement.classList.toggle('pin-enabled', visible); 1137 currentElement.classList.toggle('pin-enabled', visible);
1138 currentElement.classList.toggle('pin-disabled', !visible); 1138 currentElement.classList.toggle('pin-disabled', !visible);
1139 } 1139 }
1140
1141 // Set the focus to the input element after showing/hiding pin keyboard.
1142 visible ? this.pinKeyboard.focus() : this.passwordElement.focus();
xiyuan 2016/07/07 20:01:40 nit: this.passwordElement.focus() -> this.mainInpu
jdufault 2016/07/07 20:46:50 Can you make this a regular if/else? if (visibl
sammiequon 2016/07/08 00:21:20 Done.
sammiequon 2016/07/08 00:21:20 Done.
sammiequon 2016/07/08 00:21:20 Done.
1140 }, 1143 },
1141 1144
1142 setUserPodIconType: function(userTypeClass) { 1145 setUserPodIconType: function(userTypeClass) {
1143 this.userTypeIconAreaElement.classList.add(userTypeClass); 1146 this.userTypeIconAreaElement.classList.add(userTypeClass);
1144 this.userTypeIconAreaElement.hidden = false; 1147 this.userTypeIconAreaElement.hidden = false;
1145 }, 1148 },
1146 1149
1147 /** 1150 /**
1148 * The user that this pod represents. 1151 * The user that this pod represents.
1149 * @type {!Object} 1152 * @type {!Object}
(...skipping 2347 matching lines...) Expand 10 before | Expand all | Expand 10 after
3497 if (pod && pod.multiProfilesPolicyApplied) { 3500 if (pod && pod.multiProfilesPolicyApplied) {
3498 pod.userTypeBubbleElement.classList.remove('bubble-shown'); 3501 pod.userTypeBubbleElement.classList.remove('bubble-shown');
3499 } 3502 }
3500 } 3503 }
3501 }; 3504 };
3502 3505
3503 return { 3506 return {
3504 PodRow: PodRow 3507 PodRow: PodRow
3505 }; 3508 };
3506 }); 3509 });
OLDNEW
« no previous file with comments | « ui/login/account_picker/user_pod_row.css ('k') | ui/login/screen_container.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698