From a7da6b8e553f9b302290c6f09b43e16ac0581bba Mon Sep 17 00:00:00 2001 From: Ruslan Bekenev Date: Mon, 2 Nov 2015 23:13:49 +0300 Subject: [PATCH] fixed issue #4224 continue button should be enabled even in case of autofill the email field --- resources/static/dialog/js/modules/authenticate.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/resources/static/dialog/js/modules/authenticate.js b/resources/static/dialog/js/modules/authenticate.js index ad76f8d1a..c903cafa7 100644 --- a/resources/static/dialog/js/modules/authenticate.js +++ b/resources/static/dialog/js/modules/authenticate.js @@ -383,6 +383,17 @@ BrowserID.Modules.Authenticate = (function() { } self.bind(EMAIL_SELECTOR, "keyup", emailChange); + + // In case of autofill the continue button was disabled + // To make sure that email field is not empty we have to + // use setInterval function. + // See issue #4224 + window.setInterval(function(){ + var emailFieldValue = dom.getInner(EMAIL_SELECTOR); + if(emailFieldValue != '') { + dom.removeAttr(CONTINUE_BUTTON_SELECTOR, DISABLED_ATTRIBUTE); + } + }, 200); // Adding the change event causes the email to be checked whenever an // element blurs but it has been updated via autofill. See issue #406 self.bind(EMAIL_SELECTOR, "change", emailChange);