How do I deal with a browsers own autocomplete suggestions?

I have the following input in an Angular component:
<input autocomplete="family-name" formControlName="lname" placeholder="Last Name" required type="text">
<input autocomplete="family-name" formControlName="lname" placeholder="Last Name" required type="text">
Yet when my form loads, Chrome auto-fills this input with my email address. None of my Angular code is pre-filling the input, and I have even set autocomplete="off" for the input so I can only suspect Chrome. Chrome even auto-fills my password1 input, where the autocomplete attribute is not even available on password type inputs. I want to completely disable any autocomplete for this form. How can I do that?
2 Replies
Angius
Angius2y ago
Chrome doesn't respect autocomplete="off" The support for what autocomplete is available, what gets autocompleted, if you can even turn it off, varies widely between browsers
Brady Kelly
Brady Kelly2y ago
It's a pain in the arse. On the angular app where I'm trying to implement auth Chrome keeps filling my family-name field with my email address, and insists on filling my password, and it really makes manual testing of e.g. login and signup forms that much harder