I have an issue in Firefox when I am trying to view my typed password. Here is my code:
<div class="input-group bmargindiv1 col-md-12">
<span style="position:absolute; right:5px; margin-top:6px; top:0px;"><button class="btn btn-xs btn-success"ng-mousedown="hideShowPassword();" ng-mouseup="hideShowPassword();" ng-mouseleave="hidePassAfterLeave();" ><i class="fa fa-eye"></i></button></span>
<span class="input-group-addon ndrftextwidth text-right" style="width:180px">Password :</span>
<div ng-class="{ 'myError': billdata.pass.$touched && billdata.pass.$invalid }">
<input type="{{inputType}}" name="pass" id="passno" class="form-control" placeholder="password" ng-model="password" ng-minlength="8" ng-pattern="/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[_!@#\$%\^&\*])(?=.{8,})/" ng-keypress="clearField('passno');" >
</div>
My controller code is given below.
$scope.inputType="password";
$scope.hideShowPassword=function(){
if($scope.inputType=='password'){
$scope.inputType="text";
}else{
$scope.inputType="password";
}
}
$scope.hidePassAfterLeave=function(){
$scope.inputType="password";
}
Here when user can view the typed password by clicking on the eye button present there. But problem is when user is pressing that eye button to view password the alert prompt is coming with the content Would you like Firefox to remember this password
in Firefox.
It's happening repeatedly by each clicking of that button which I don't need. How can I resolve this issue?