Live data from Hacker News

Chrome does not respect autocomplete=off (2018)

bugs.chromium.org

51–60 of 84 posts

Re: Chrome does not respect autocomplete=off (2018)

#51
Unfortunately, the decision to ignore the autocomplete attribute also makes it very hard to help the browser pick up the appropriate autofill username/password fields.

All browsers right now basically assume that if you have an input type="password", then the previous input type="text" must be the username field. And there's little you can do to change this without resorting to substantial hacks like using a hidden username-looking honeypot field to eat the poor browser behavior.

For example, imagine a pop-up confirmation box that asks you for your password before continuing. Or really just a "confirm password" field on any form. It can be very hard to get browser or extension password autofill to only affect that one field and not inject a username into some other field on the page. Password managers in browsers and extensions are surprisingly brain-dead, and they give us no tools to help them out.

To put UX first, especially around something as UX-sensitive as password autofill, you end up needing to put in a lot of extra work to make up for the browser's confidently-wrong implementations.

The original decision to ignore autocomplete="off" was probably the right move. But now that the autocomplete attribute has been overloaded with password manager concerns built in to web browsers these days, nobody has bothered to revisit the ordeal.

Re: Chrome does not respect autocomplete=off (2018)

#52
post #15

Cool. Do paste blockers next.

While we're complaining about pasting, am I the only one who gets annoyed by sites that only have click to copy buttons for certain content? It's often either that or they try to help me out by highlighting it. What I really want is to highlight it myself so I can paste it into my terminal. It'd be great if there was a way to get the button click copies to go to my other clipboard but I can't find anything on it anyw…

Just in case you weren't aware - be careful copy / pasting into terminal.

https://thejh.net/misc/website-terminal-copy-paste

Re: Chrome does not respect autocomplete=off (2018)

#53
post #12

Earlier quoted context omitted.

I’ve seen autocomplete create plenty of problems. It can break some (admittedly poorly designed) forms outright. Or in others simply create a bad user experience. There are lots of forms that ask for an address but that should never be autocompleted to the user’s address. In practice as a developer you have to resort to JavaScript hacks and obfuscating form field names to avoid it.

I really really wish there was a way (holding shift, ctrl or something) to only autofill the one field without it goig to fill/replace every other field on the page. It's so annoying when the stuff you just field get replaced just because you want to autofill one field.

:/

> It's very hackish way but I found a trick to achieve the same.

> So you should go to chrome://settings/addresses?search=address

> Now create multiple addresses, each with only one field filled. So one should only have your E-Mail, another record should contain only your first name only, and so on.

https://superuser.com/questions/477144/can-autofill-in-chrom...

A variation:

https://support.google.com/chrome/thread/31845659?hl=en

Re: Chrome does not respect autocomplete=off (2018)

#54

GOOD! Acting like a user agent, as it should be! If only there was also a way to cause unending pain to anyone who created those nasty "do not paste in here" javascript tricks too..

That's great that Chrome happens to work as you like, but I am also a user and hate this behavior. How do I get Chrome to function as a user agent in this regard?

Re: Chrome does not respect autocomplete=off (2018)

#55

I was asked by my users of an internal tool to disable autocomplete. I added autocomplete="off" and autocorrect="off" (spell checking makes no sense for this field), and it was disabled, including for chrome users. Am I missing something? Is there some sort of heuristic to when it actually disables that I just got on the good side of by pure luck?

> Am I missing something? Is there some sort of heuristic to when it actually disables that I just got on the good side of by pure luck?

Yep, you are.

Chrome will fill in fields by not just looking at the autocomplete attribute, but also by trying to magically infer it based off the name attribute (and other heuristics).

For example, if you have a text entry box for a filename, and happen to set "name='name'" on it, even with autocomplete off you will get a pick list of people's names.

https://developers.google.com/web/fundamentals/design-and-ux...

Re: Chrome does not respect autocomplete=off (2018)

#56
post #34

> autocomplete="nope" wat. Developer gag left unchecked?

IIUC "nope" used to be effective at disabling autocomplete because it's an invalid autocomplete value which Chrome treats differently from "off" (which it ignores) or "on" (which enables autocomplete). Chrome 81 should already have fixed this quirk.

Re: Chrome does not respect autocomplete=off (2018)

#57
post #32

Earlier quoted context omitted.

I really really wish there was a way (holding shift, ctrl or something) to only autofill the one field without it goig to fill/replace every other field on the page. It's so annoying when the stuff you just field get replaced just because you want to autofill one field.

My favorite is when it autofills a whole form that has the field name only as a hint that disappears once it's filled. Of course it always fills with the wrong set of information.

That sound's like the form's fault. Even filling it in manually, you won't be able to double-check that you entered the right information.

Re: Chrome does not respect autocomplete=off (2018)

#58

I was asked by my users of an internal tool to disable autocomplete. I added autocomplete="off" and autocorrect="off" (spell checking makes no sense for this field), and it was disabled, including for chrome users. Am I missing something? Is there some sort of heuristic to when it actually disables that I just got on the good side of by pure luck?

> Am I missing something? Is there some sort of heuristic to when it actually disables that I just got on the good side of by pure luck? Yep, you are. Chrome will fill in fields by not just looking at the autocomplete attribute, but also by trying to magically infer it based off the name attribute (and other heuristics). For example, if you have a text entry box for a filename, and happen to set "name='name'" on it,…

Interesting, the label for this field is Name, but lucky for me I guess that I gave it a silly name based of the database field it maps to.

Re: Chrome does not respect autocomplete=off (2018)

#59
post #47

Earlier quoted context omitted.

Why do they even do that? What’s so bad about pasting into a form? Does the person who designed the form think your password isn’t secure unless it is written on a piece of paper kept in a bank vault?

Especially when I'm pasting my routing number or bank account number. Like are you kidding me? I went into my bank app/website, I used the "copy" feature, and I'm trying to paste here AND into your "confirmation" field. Because I don't want to typo it! How could my copy skill be worse than my typing skill?

I'm on board with not allowing paste into a confirmation field since you might have copied the wrong number so there's nothing to gain from confirming the same mistake. Imagine you're doing several transactions and on one of them, you don't quite press the copy key correctly and end up using the previous account number from the clipboard.
Post reply on HN