-1

Is there any way to stop this behavour?

<div class="form-group">
    <label for="user-profile-name-input">Name</label>
    <input type="text" id="user-profile-name-input" class="form-control" aria-describedby="name" placeholder="Name" value="...">
</div>

So every time a change anything is this input field and navigate to a new page within my website, the browser prompts me if I would like to update my username for the saved password of the site.

Is there any way to stop this behaviour?

I trying adding autocomplete=off but there was no change.

-----

UPDATE

Ok so I managed to figure it out. It was an error on my part. Keeping this post here incase anyone else encounters this issue.

I have a couple of bootstrap modals on the same page. One of them has a type=password input. Since these are not completely removed when hidden the browser still has a reference to the password input.

I removed the modal and the browser is no longer prompting for me to update my username to the saved password every time i change a value in an input field.

Ivan Bacher
  • 5,855
  • 9
  • 36
  • 56
  • Can you provide a screenshot of the prompt? Chrome for instance has a behavior where it prompts you to change your password for certain sites when you are using a password that has been deemed exposed somewhere else. – Martin Jun 15 '20 at 13:44
  • @Martin sure, just added it to the question above – Ivan Bacher Jun 15 '20 at 13:49
  • @IvanBacher that's the built-in prompt from Chrome. There's no way for it to be disabled in the code, it has to be disabled by the client. – BenM Jun 15 '20 at 13:52
  • The behavior is browser specific and not something you can change at a code level. Your browser recognizes the input field as a password field and therefore prompts for a save. To disable this in Chrome for instance, read here: https://support.1password.com/disable-browser-password-manager/ – Martin Jun 15 '20 at 13:52
  • Does this answer your question? [How to prevent a browser from storing passwords](https://stackoverflow.com/questions/41217019/how-to-prevent-a-browser-from-storing-passwords) – ikiK Jun 15 '20 at 14:02
  • Does this answer your question? [How do I disable the save password bubble in chrome using Javascript?](https://stackoverflow.com/questions/23177225/how-do-i-disable-the-save-password-bubble-in-chrome-using-javascript) – Alexandre Elshobokshy Jun 15 '20 at 14:12

2 Answers2

1

Make sure you dont have a hidden input "type=password" somewhere on your page.


What you're asking for cannot be done at a code level. The behavior you're experiencing is browser specific and is something that can only be turned off by the user themselves if they choose to.

An example of how you can turn it off in Chrome here.

The browser recognizes the input field as a password field and therefore prompts for a password save, since the browser does not have a password stored for that specific page. Clicking "Never" will only stop the prompt for that page specifically, and any future page will still continue to prompt you until you completely disable the feature.

There are some hacky, tacky solutions to your problem if you really wanna go about it - check this post for instance, or this one. However, I strongly recommend that you don't use them as they are detrimental to the user experience. Let the user decide whether they want the feature or not.

Ivan Bacher
  • 5,855
  • 9
  • 36
  • 56
Martin
  • 2,326
  • 1
  • 12
  • 22
  • the password is already saved though. Its seems to just be wanting to update the saved username with whatever text is in that input field. Or if the input field is left blank, then it does the same for the input below it. – Ivan Bacher Jun 15 '20 at 14:04
  • It will keep prompting as long as it recognizes the field, but doesn't recognize the password in accordance to the user. It will either prompt for a save or an update until this feature has been disabled manually. – Martin Jun 15 '20 at 14:10
  • There are hacky, tacky solutions if you really do wanna go about it, but it's detrimental to the user experience. – Martin Jun 15 '20 at 14:12
  • Ahh your comment actually helped me fix the issue. I have a modal on the page that contains a password input. It was hidden but the browser could still "see" the password field. Removed, it now the browser isn't giving me the prompt anymore. – Ivan Bacher Jun 15 '20 at 14:20
0

That's a default functionality provided by chrome to save your credentials while you enter your credentials in your account in browser and not to repeat the credentials when you are trying to re login. There's no way to stop it by using HTML code.