diff --git a/resources/static/dialog/js/modules/authenticate.js b/resources/static/dialog/js/modules/authenticate.js index 24ea77b11e8acf28ef98b6af66c62dd200061e56..9db3330d903b612105cba30f72555b4a5619a1da 100644 --- a/resources/static/dialog/js/modules/authenticate.js +++ b/resources/static/dialog/js/modules/authenticate.js @@ -18,7 +18,8 @@ BrowserID.Modules.Authenticate = (function() { dom = bid.DOM, lastEmail = "", addressInfo, - hints = ["returning","start","addressInfo"]; + hints = ["returning","start","addressInfo"], + currentHint; function getEmail() { return helpers.getAndValidateEmail("#email"); @@ -101,6 +102,12 @@ BrowserID.Modules.Authenticate = (function() { } function showHint(showSelector, callback) { + // Only show the hint if it is not already shown. Showing the same hint + // on every keypress massively slows down Fennec. See issue #2010 + // https://github.com/mozilla/browserid/issues/2010 + if (currentHint === showSelector) return; + currentHint = showSelector; + _.each(hints, function(className) { if(className != showSelector) { dom.hide("." + className + ":not(." + showSelector + ")");