Commit da4a7dfb authored by Jordy Greenblatt's avatar Jordy Greenblatt Committed by Commit Bot

[CrOS MultiDevice] Fix Setup Flow bug causing spurious setup attempts

The bug was caused by the change event on the password text field
triggering the event 'user-submitted-password' which causes a forward
navigate attempt. This fails if the password is wrong (this causes the
'incorrect password' issue in the bug) and succeeds if the password is
correct (this causes the spurious flow continuation issue).

Bug: 884965
Change-Id: I4ae9f9f9fd01901dacd9e69a216bdd3123eb9344
Reviewed-on: https://chromium-review.googlesource.com/1252503
Commit-Queue: Jordy Greenblatt <jordynass@chromium.org>
Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#595219}
parent f369a29a
......@@ -40,7 +40,7 @@
error-message="[[i18n('wrongPassword')]]"
value="{{inputValue_}}"
aria-disabled="false"
on-change="onUserPressedEnter_"
on-keypress="onInputKeypress_"
autofocus>
</cr-input>
</div>
......
......@@ -138,8 +138,15 @@ Polymer({
this.passwordInvalid_ = false;
},
/** @private */
onUserPressedEnter_: function() {
/**
* @param {!Event} e
* @private
*/
onInputKeypress_: function(e) {
// We are only listening for the user trying to enter their password.
if (e.key != 'Enter')
return;
this.fire('user-submitted-password');
},
......
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