Skip to content

Commit

Permalink
trigger change event after autofill
Browse files Browse the repository at this point in the history
  • Loading branch information
ccataalin committed Jan 5, 2024
1 parent 9346b33 commit d9e5faf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,11 @@ function checkMfa() {

$(document).ready(function(){
const $loginForm = $('#hdx-login-form');
const $loginFormRequiredFields = $loginForm.find('input, select, textarea').filter('[required]');
$loginForm.submit(checkLockout);
$loginForm.find('input, select, textarea').filter('[required]').on('input change', requiredFieldsFormValidator);
$loginFormRequiredFields.on('input change focus', requiredFieldsFormValidator);
$("#field-login").change(checkMfa);
$loginFormRequiredFields.filter(() => this.value !== '').first().trigger('change');
//check cookies
const loginCookie = $.cookie("hdx_login");
const loginPopup = $("#loginPopup").length > 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,7 @@ $(document).ready(function(){
return false;
});

$recoverForm.find('input, select, textarea').filter('[required]').on('input change', requiredFieldsFormValidator);
const $recoverFormRequiredFields = $recoverForm.find('input, select, textarea').filter('[required]');
$recoverFormRequiredFields.on('input change', requiredFieldsFormValidator);
$recoverFormRequiredFields.filter(() => this.value !== '').first().trigger('change');
});

0 comments on commit d9e5faf

Please sign in to comment.