Commit ee492c43 authored by sammiequon's avatar sammiequon Committed by Commit bot

Submit button on not working.

BUG=627938
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2157533002
Cr-Commit-Position: refs/heads/master@{#406075}
parent 5a1b4b17
...@@ -56,14 +56,6 @@ Polymer({ ...@@ -56,14 +56,6 @@ Polymer({
return this.$$('#pin-input'); return this.$$('#pin-input');
}, },
/**
* Gets the submit button.
* @type {!HTMLElement}
*/
get submitButton() {
return this.$$('.submit-button');
},
/** Transfers focus to the input element. */ /** Transfers focus to the input element. */
focus: function() { focus: function() {
this.$$('#pin-input').focus(); this.$$('#pin-input').focus();
......
...@@ -712,6 +712,11 @@ cr.define('login', function() { ...@@ -712,6 +712,11 @@ cr.define('login', function() {
this.addEventListener('click', this.handleClickOnPod_.bind(this)); this.addEventListener('click', this.handleClickOnPod_.bind(this));
this.addEventListener('mousedown', this.handlePodMouseDown_.bind(this)); this.addEventListener('mousedown', this.handlePodMouseDown_.bind(this));
if (this.pinKeyboard) {
this.pinKeyboard.addEventListener('submit',
this.handlePinSubmitted_.bind(this));
}
this.actionBoxAreaElement.addEventListener('mousedown', this.actionBoxAreaElement.addEventListener('mousedown',
stopEventPropagation); stopEventPropagation);
this.actionBoxAreaElement.addEventListener('click', this.actionBoxAreaElement.addEventListener('click',
...@@ -1790,6 +1795,15 @@ cr.define('login', function() { ...@@ -1790,6 +1795,15 @@ cr.define('login', function() {
this.userClickAuthAllowed_ = this.parentNode.isFocused(this); this.userClickAuthAllowed_ = this.parentNode.isFocused(this);
}, },
/**
* Handles click event on submit button on the pin keyboard.
* @param {Event} e Click event.
*/
handlePinSubmitted_: function(e) {
if (this.parentNode.isFocused(this))
this.parentNode.setActivatedPod(this);
},
/** /**
* Handles click event on a user pod. * Handles click event on a user pod.
* @param {Event} e Click event. * @param {Event} e Click event.
...@@ -1805,11 +1819,6 @@ cr.define('login', function() { ...@@ -1805,11 +1819,6 @@ cr.define('login', function() {
// Note that this.userClickAuthAllowed_ is set in mouse down event // Note that this.userClickAuthAllowed_ is set in mouse down event
// handler. // handler.
this.parentNode.setActivatedPod(this); this.parentNode.setActivatedPod(this);
} else if (this.pinKeyboard.submitButton &&
e.target == this.pinKeyboard.submitButton) {
// Sets the pod as activated if the submit button is clicked so that
// it simulates what the enter button does for the password/pin.
this.parentNode.setActivatedPod(this);
} }
if (this.multiProfilesPolicyApplied) if (this.multiProfilesPolicyApplied)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment