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

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: Passes closure compiliation. 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 de93c08df1b17741ac5612be76bb7a37cf141619..f478e854e88f462cddc4c5e3a216708def058f74 100644
--- a/chrome/browser/resources/chromeos/quick_unlock/pin_keyboard.js
+++ b/chrome/browser/resources/chromeos/quick_unlock/pin_keyboard.js
@@ -57,6 +57,13 @@ Polymer({
onNumberTap_: function(event, detail) {
var numberValue = event.target.getAttribute('value');
this.value += numberValue;
+
+ // If a number button is clicked, we do not want to switch focus to the
+ // button, therefore we transfer focus back to the input, but if a number
+ // button is tabbed into, it should keep focus, so users can use tab and
+ // spacebar/return to enter their PIN.
+ if (!event.target.classList.contains('keyboard-focus'))
jdufault 2016/07/12 19:59:44 What about just casting event.target to the right
+ this.focus();
},
/** Fires a submit event with the current PIN value. */
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698