From 9ff0c086b956139baa8e4273ab0fbc43d936c248 Mon Sep 17 00:00:00 2001
From: Shane Tomlinson <stomlinson@mozilla.com>
Date: Wed, 6 Jun 2012 13:43:02 +0100
Subject: [PATCH] Click events for the development menu should only be bound
 once.

---
 resources/static/shared/modules/development.js | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/resources/static/shared/modules/development.js b/resources/static/shared/modules/development.js
index 44257c215..5c676960a 100644
--- a/resources/static/shared/modules/development.js
+++ b/resources/static/shared/modules/development.js
@@ -22,17 +22,17 @@ BrowserID.Modules.Development = (function() {
     if(clickCount === 4) {
       if(!document.getElementById("development")) {
         renderer.append("body", "development", {});
+        this.click("#showError", showError);
+        this.click("#showDelay", showDelay);
+        this.click("#showWait", showWait);
+        this.click("#hideAll,footer,#errorBackground", hideScreens);
+        this.click("#clearLocalStorage", clearLocalStorage);
+        this.click("#clearEmailsForSites", clearEmailsForSites);
+        this.click("#forceIsThisYourComputer", forceIsThisYourComputer);
+        this.click("#closeDevelopment", close);
       }
 
       dom.addClass("body", "development");
-      this.click("#showError", showError);
-      this.click("#showDelay", showDelay);
-      this.click("#showWait", showWait);
-      this.click("#hideAll,footer,#errorBackground", hideScreens);
-      this.click("#clearLocalStorage", clearLocalStorage);
-      this.click("#clearEmailsForSites", clearEmailsForSites);
-      this.click("#forceIsThisYourComputer", forceIsThisYourComputer);
-      this.click("#closeDevelopment", close);
     }
   }
 
-- 
GitLab