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

Unified Diff: chrome/browser/resources/chromeos/quick_unlock/pin_keyboard.js

Issue 2119713003: Pin keyboard use enter to submit when focus is not on a button. (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
Index: chrome/browser/resources/chromeos/quick_unlock/pin_keyboard.js
diff --git a/chrome/browser/resources/chromeos/quick_unlock/pin_keyboard.js b/chrome/browser/resources/chromeos/quick_unlock/pin_keyboard.js
index ca343b2e90386434eff0b825f3037bc075960652..21ea484028a0b6f0ad1166ac6fd10f3c3f1b078f 100644
--- a/chrome/browser/resources/chromeos/quick_unlock/pin_keyboard.js
+++ b/chrome/browser/resources/chromeos/quick_unlock/pin_keyboard.js
@@ -37,13 +37,19 @@ Polymer({
/** Transfers focus to the input element. */
focus: function() {
- this.$$('#pin-input').focus();
+ var pinInput = this.$$('#pin-input');
+ pinInput.focus();
jdufault 2016/07/06 21:08:51 Revert these changes.
sammiequon 2016/07/06 23:38:02 Done.
},
/** Called when a keypad number has been tapped. */
onNumberTap_: function(event, detail) {
var numberValue = event.target.getAttribute('value');
this.value += numberValue;
+
+ // If the number received focus from the mouse click, we trasnfer the focus
jdufault 2016/07/06 21:08:51 nit: transfer Can you update the comment to expla
sammiequon 2016/07/06 23:38:02 Done.
+ // to the input.
+ if (!event.target.receivedFocusFromKeyboard)
+ this.focus();
},
/** Fires a submit event with the current PIN value. */

Powered by Google App Engine
This is Rietveld 408576698