Refocus credential typedInput when hide/show button clicked

This commit is contained in:
Nick O'Leary 2020-02-10 11:16:19 +00:00
parent 33cbb2ada8
commit bffcaa1c17
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
1 changed files with 6 additions and 0 deletions

View File

@ -188,9 +188,15 @@
if (currentType === "text") {
that.input.attr("type","password");
eyeCon.removeClass("fa-eye-slash").addClass("fa-eye");
setTimeout(function() {
that.input.focus();
},50);
} else {
that.input.attr("type","text");
eyeCon.removeClass("fa-eye").addClass("fa-eye-slash");
setTimeout(function() {
that.input.focus();
},50);
}
}).hide();
var eyeCon = $('<i class="fa fa-eye"></i>').css("margin-left","-1px").appendTo(eyeButton);