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

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

Issue 2131823004: Dialog message saying PIN is incorrect positioned correctly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Fixed patch set 3 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 de93c08df1b17741ac5612be76bb7a37cf141619..607e3423760af60d0548a963e8df8d880f597591 100644
--- a/chrome/browser/resources/chromeos/quick_unlock/pin_keyboard.js
+++ b/chrome/browser/resources/chromeos/quick_unlock/pin_keyboard.js
@@ -48,6 +48,27 @@ Polymer({
}
},
+ /**
+ * Gets the container holding the password field.
+ * @type {!HTMLInputElement}
+ */
+ get inputElement() {
+ return this.$$('#pin-input');
+ },
+
+ /**
+ * Gets the submit button.
+ * @type {!HTMLElement}
+ */
+ get submitButton() {
+ return this.$$('.submit-button');
+ },
+
+ /** Clears the current input. */
+ clear: function() {
+ this.value = '';
+ },
+
/** Transfers focus to the input element. */
focus: function() {
this.$$('#pin-input').focus();
@@ -59,11 +80,6 @@ Polymer({
this.value += numberValue;
},
- /** Fires a submit event with the current PIN value. */
- firePinSubmitEvent_: function() {
- this.fire('submit', { pin: this.value });
- },
-
/**
* Fires an update event with the current PIN value. The event will only be
jdufault 2016/07/11 22:35:08 The settings UI integration still listens for the
sammiequon 2016/07/11 23:13:23 Done.
* fired if the PIN value has actually changed.
@@ -90,13 +106,6 @@ Polymer({
event.preventDefault();
return;
}
-
- // Enter pressed.
- if (event.keyCode == 13) {
- this.firePinSubmitEvent_();
- event.preventDefault();
- return;
- }
},
/**

Powered by Google App Engine
This is Rietveld 408576698