javascript - Password field is not working while dragging mouse using angular.js -


i have issue.i have password filed eye icon.when user click on eye icon whatever password has typed displayed text , mouse again displayed password.in case happening when user dragging mouse up/down after click on eye icon typed password showing text should not happen.i explaining code below.

<div class="input-group bmargindiv1 col-md-12"> <span style="position:absolute; right:5px; margin-top:6px;"><button class="btn btn-xs btn-success"ng-mousedown="hideshowpassword();" ng-mouseup="hideshowpassword();" ><i class="fa fa-eye"></i></button></span> <span class="input-group-addon ndrftextwidth text-right" style="width:180px">password :</span> <input type="{{inputtype}}" name="itemname" id="contactno" class="form-control" placeholder="password" ng-model="password" > </div> 

the related controller code given below.

$scope.inputtype="password";      $scope.hideshowpassword=function(){          if($scope.inputtype=='password'){              $scope.inputtype="text";          }else{              $scope.inputtype="password";          }      } 

here problem suppose user clicked on eye icon,the password displayed text , same time user dragged up/down keeping mouse press @ time password displaying text don't need.please me resolve issue.


Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -