plugins/yubikey/yubikey.js
changeset 26 0dac837643a4
parent 25 2e7ccbdfdc0a
parent 23 4b868c7c241e
child 28 b9a3da602841
--- a/plugins/yubikey/yubikey.js	Fri Jul 17 17:15:10 2009 -0400
+++ b/plugins/yubikey/yubikey.js	Fri Jul 17 17:15:29 2009 -0400
@@ -55,7 +55,12 @@
           window.clearInterval(yk_interval);
           miniPromptDestroy(this);
         }
-        else if ( this.value.length >= 44 && !this.submitted )
+        else if ( this.value.length == 44 && !this.submitted )
+        {
+          this.submitted = true;
+          yk_handle_submit(this);
+        }
+        else if ( e.keyCode == 13 && this.value.length != 44 )
         {
           this.submitted = true;
           yk_handle_submit(this);