summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
authorjamiewalch@google.com <jamiewalch@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-18 22:34:40 +0000
committerjamiewalch@google.com <jamiewalch@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-18 22:34:40 +0000
commit369c32748e57de8310e99f423602be3fc50646ee (patch)
tree6a60f274c08cd9335b58829069fbe8c62783e032 /remoting
parenta27559e630fe063535eef7d9459024e38406552d (diff)
downloadchromium_src-369c32748e57de8310e99f423602be3fc50646ee.zip
chromium_src-369c32748e57de8310e99f423602be3fc50646ee.tar.gz
chromium_src-369c32748e57de8310e99f423602be3fc50646ee.tar.bz2
Allow Enter to be used to enter a PIN.
BUG=None TEST=Manual Review URL: https://chromiumcodereview.appspot.com/10041045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132883 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r--remoting/webapp/host_setup_dialog.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/remoting/webapp/host_setup_dialog.js b/remoting/webapp/host_setup_dialog.js
index bc44aaa..8bee4661 100644
--- a/remoting/webapp/host_setup_dialog.js
+++ b/remoting/webapp/host_setup_dialog.js
@@ -126,9 +126,13 @@ remoting.HostSetupDialog = function(hostController) {
};
/** @param {Event} event A keypress event. */
var noDigitsInPin = function(event) {
- if ((event.which < 48) || (event.which > 57)) {
- event.preventDefault();
+ if (event.which == 13) {
+ return; // Otherwise the "submit" action can't be triggered by Enter.
}
+ if ((event.which >= 48) && (event.which <= 57)) {
+ return;
+ }
+ event.preventDefault();
};
this.pinEntry_.addEventListener('keypress', onDaemonPinEntryKeyPress, false);
this.pinEntry_.addEventListener('keypress', noDigitsInPin, false);