Suggest password function in Chrome browser Answered

Post author
Dave Gale

hello! I'm noticing that the "suggest password" function on chrome based browsers is overriding the visibility settings on my confirm password field. Anyone ever run into this issue and figure out a work around or any suggestions? I've attached a screen shot. My hide/show password function is running from this script

<script> $("#eye_open_password").click(function(){ $("#Password").attr("type", "text"); }); $("#eye_close_password").click(function(){ $("#Password").attr("type", "password"); }); $("#eye_open_confirm_password").click(function(){ $("#ConfirmPassword").attr("type", "text"); }); $("#eye_close_confirm_password").click(function(){ $("#ConfirmPassword").attr("type", "password"); }); </script>

Comments

4 comments

  • Comment author
    Chukwudi Onyekwere

    HI Jake,

    One sure workaround is to disable the browser's default password suggestion feature. You can achieve this by adding the autocomplete="off" attribute to your password input fields.

    Here's how you can modify your HTML:

    <input type="password" id="Password" name="Password" autocomplete="off"> <input type="password" id="ConfirmPassword" name="ConfirmPassword" autocomplete="off">

    I hope this helps.

    0
  • Comment author
    Dave Gale

    and that won't mess up auto-complete on the other fields?

    0
  • Comment author
    Chukwudi Onyekwere

    No, it won't. 🙂

    0
  • Comment author
    Dave Gale

    Thanks for your help!

    0

Please sign in to leave a comment.