| 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 b5247b60a07b91fcd892aaf50991b5f9001841c9..44c6801dafc62dd2543c04e53c88e084cb2f4c20 100644
|
| --- a/ui/login/account_picker/user_pod_row.js
|
| +++ b/ui/login/account_picker/user_pod_row.js
|
| @@ -714,8 +714,6 @@ cr.define('login', function() {
|
| this.addEventListener('mousedown', this.handlePodMouseDown_.bind(this));
|
|
|
| if (this.pinKeyboard) {
|
| - this.pinKeyboard.addEventListener('submit',
|
| - this.handlePinSubmitted_.bind(this));
|
| this.pinKeyboard.addEventListener('pin-change',
|
| this.handlePinChanged_.bind(this));
|
| }
|
| @@ -757,6 +755,7 @@ cr.define('login', function() {
|
| this.handlePasswordKeyPress_.bind(this));
|
| this.passwordElement.addEventListener('input',
|
| this.handleInputChanged_.bind(this));
|
| +
|
| this.submitButton.addEventListener('click',
|
| this.handleSubmitButtonClick_.bind(this));
|
|
|
| @@ -1159,6 +1158,10 @@ cr.define('login', function() {
|
|
|
| // Set the focus to the input element after showing/hiding pin keyboard.
|
| this.mainInput.focus();
|
| +
|
| + // Change the password placeholder based on pin keyboard visibility.
|
| + this.passwordElement.placeholder = loadTimeData.getString(visible ?
|
| + 'pinKeyboardPlaceholderPinPassword' : 'passwordHint');
|
| },
|
|
|
| isPinShown: function() {
|
| @@ -1847,23 +1850,31 @@ cr.define('login', function() {
|
| },
|
|
|
| /**
|
| - * Handles click event on submit button on the pin keyboard.
|
| - * @param {Event} e Click event.
|
| + * Handles updating the submit button disable state and color.
|
| */
|
| - handlePinSubmitted_: function(e) {
|
| - if (this.parentNode.isFocused(this))
|
| - this.parentNode.setActivatedPod(this);
|
| + updateSubmitButton_: function() {
|
| + this.submitButton.disabled = this.passwordElement.value.length <= 0;
|
| + this.showError = false;
|
| + $('bubble').hide();
|
| },
|
|
|
| + /**
|
| + * Handles pin change event from the pin keyboard.
|
| + * @param {Event} e Pin change event.
|
| + */
|
| handlePinChanged_: function(e) {
|
| this.passwordElement.value = e.detail.pin;
|
| + this.updateSubmitButton_();
|
| },
|
|
|
| + /**
|
| + * Handles input event on the password element.
|
| + * @param {Event} e Input event.
|
| + */
|
| handleInputChanged_: function(e) {
|
| if (this.pinKeyboard)
|
| this.pinKeyboard.value = this.passwordElement.value;
|
| - this.submitButton.disabled = this.passwordElement.value.length <= 0;
|
| - this.showError = false;
|
| + this.updateSubmitButton_();
|
| },
|
|
|
| /**
|
|
|