From: Art Cancro Date: Thu, 1 Dec 2011 19:05:21 +0000 (-0500) Subject: Pressing enter/return in the openid url box submits the form X-Git-Tag: v8.03~12 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=702510bb9567507cf346b00955c0c9ba042a3e0b;hp=683faaa1fb1b5190ceda941ac870ed2d25274884 Pressing enter/return in the openid url box submits the form --- diff --git a/webcit/static/authmethods.js b/webcit/static/authmethods.js index fca4cf266..8ad1e29fa 100644 --- a/webcit/static/authmethods.js +++ b/webcit/static/authmethods.js @@ -138,10 +138,10 @@ function ajax_try_newuser() { */ function newuser_onkeypress(e) { if (window.event) { /* IE */ - keynum = e.keyCode + keynum = e.keyCode; } else if (e.which) { /* real browsers */ - keynum = e.which + keynum = e.which; } if (keynum == 13) { /* enter/return key */ ajax_try_newuser(); @@ -163,4 +163,20 @@ function ajax_try_openid() { } +/* + * The user pressed a key while in the openid login box. + * Is it the enter/return key? Submit the form. + */ +function openid_onkeypress(e) { + if (window.event) { /* IE */ + keynum = e.keyCode; + } + else if (e.which) { /* real browsers */ + keynum = e.which; + } + if (keynum == 13) { /* enter/return key */ + ajax_try_openid(); + } +} + diff --git a/webcit/static/t/get_logged_in.html b/webcit/static/t/get_logged_in.html index 7c4573fa7..7287f0500 100644 --- a/webcit/static/t/get_logged_in.html +++ b/webcit/static/t/get_logged_in.html @@ -73,7 +73,7 @@

- +