From c738bd236f943dc7df3aabaf667c9546d4fd1f2e Mon Sep 17 00:00:00 2001
From: Shane Tomlinson <stomlinson@mozilla.com>
Date: Thu, 6 Oct 2011 10:41:12 +0100
Subject: [PATCH] Making sure to call onComplete even if the key for an address
 is already generated.

---
 .../static/dialog/controllers/pickemail_controller.js     | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/browserid/static/dialog/controllers/pickemail_controller.js b/browserid/static/dialog/controllers/pickemail_controller.js
index cac824f5f..caf7f1e73 100644
--- a/browserid/static/dialog/controllers/pickemail_controller.js
+++ b/browserid/static/dialog/controllers/pickemail_controller.js
@@ -82,10 +82,12 @@
 
   function signIn(element, event) {
     var self=this,
-        animationComplete = false,
+        body = $("body"),
+        animationComplete = body.innerWidth() < 640,
         assertion,
         email = $("input[type=radio]:checked").val();
 
+
     cancelEvent(event);
 
     function onComplete() {
@@ -103,7 +105,6 @@
       onComplete();
     });
 
-    var body = $("body");
 
     if(body.innerWidth() > 640) {
       $("#signIn").animate({"width" : "685px"}, "slow", function () {
@@ -114,9 +115,6 @@
          });
       }); 
     }
-    else {
-      animationComplete = true;
-    }
   }
 
   function addEmail(element, event) {
-- 
GitLab