Skip to content

Commit

Permalink
fixed issue mozilla#4224
Browse files Browse the repository at this point in the history
continue button should be enabled even in case
of autofill the email field
  • Loading branch information
krydos committed Nov 2, 2015
1 parent a76621d commit a7da6b8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions resources/static/dialog/js/modules/authenticate.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a7da6b8

Please sign in to comment.