News for hackers. Stuff that matters.
Re:“autocomplete=off is ignored on non-login input elements” by Someone1234 on Wednesday June 15, 2016 @03:26PM (#11911463)
I'm going to side with the Chrome team on this one. There's very few occasions when autocomplete being disabled makes sense, the vast majority are just developers dumping it in there because they want to make doubly-sure the user actually entered a field by hand (e.g. email addresses) and often for vaporous reasons like "Improve Data Quality," "Stop Spammers/Bots," and "Make sure the user enters the right data in the right box."

Ultimately if you want to assure data quality then use data or format validation, or verification (e.g. send an email with link). If you want to stop bots/spammers use captcha.

We did go through a period where people were "misusing" standard input boxes for other things and autocomplete would ruin that extra usage. But hopefully we've moved beyond turning an input box into a richtextbox using a complex array of hacks, and can now instead use things like Canvas.

PS - Hopefully they disable "smooth scroll" scripts next. So tired of having my scrolling ruined by "helpful" sites.

Re:“autocomplete=off is ignored on non-login input elements” by mrweasel on Wednesday June 15, 2016 @03:47PM (#11911639)
>There's very few occasions when autocomplete being disabled makes sense

True, perhaps. The point is that's not for Google to decide. In their example with CRM system, it's very possible that the developer did think about it, and decided that autocompletion would "help" the user enter wrong data.

Now Chrome forces you to be non-compliant to work-around to their "custom feature".

Chrome is increasingly encouraging developer behaviour that's reminiscent of Microsoft and Internet Explorer 6.

Re:“autocomplete=off is ignored on non-login input elements” by timdierks on Wednesday June 15, 2016 @03:57PM (#11911706)
It's not for the developer to decide any more than the browser. It's up to the user.
Re:“autocomplete=off is ignored on non-login input elements” by wmil on Wednesday June 15, 2016 @04:35PM (#11911971)
Except there's no ability for the user to disable autosave on a page specific basis.

So if autocomplete breaks functionality then there's nothing the user can do if the developer assumed autocomplete='off' would continue to work.

Except disable autocomplete on every site, which is kind of overkill.

Re:“autocomplete=off is ignored on non-login input elements” by dragonwriter on Wednesday June 15, 2016 @05:01PM (#11912110)
> So if autocomplete breaks functionality then there's nothing the user can do if the developer assumed autocomplete='off' would continue to work.

Developers should not expect that things specced as hints will be treated as authoritative direction and should not make software that breaks if that unreasonable expectation doesn't hold.

Re:“autocomplete=off is ignored on non-login input elements” by volatilitish on Wednesday June 15, 2016 @04:39PM (#11912000)
There are lots of examples.

I'll give one. A text input for a chat you're having with someone. It's very very offputting and irritating to have the browser constantly cluttering the UI with suggestions about what you might want to type in that chat box before you press enter.

Re:“autocomplete=off is ignored on non-login input elements” by gmazza on Wednesday June 15, 2016 @04:41PM (#11912008)
Message input field for chat/forum would typically be <textarea>. For example - have a look at reply page source right here, on HN.

And <textarea> doesn't auto-complete regardless of explicit options.

Re:“autocomplete=off is ignored on non-login input elements” by tracker1 on Wednesday June 15, 2016 @05:29PM (#11912286)
Well, inline chat, like IRC is generally a single-line input... though I suppose you could use a textarea rows="1" and strip \n on paste, etc, that wouldn't be too bad as you're likely listening for \n to post the message anyway.

Either way, not using a typical name/id for the text input would probably work better in terms of not getting suggestions...

Re:“autocomplete=off is ignored on non-login input elements” by pluma on Wednesday June 15, 2016 @05:27PM (#11912275)
Chat input is typically single-line, submit-on-enter. Messaging apps seem to be transitioning to optional multiline but the default action for enter still seems to be submit so it's perfectly reasonable to use <input> for chat input.
Re:“autocomplete=off is ignored on non-login input elements” by volatilitish on Wednesday June 15, 2016 @05:29PM (#11912290)
That would indeed be the norm for forums. But not for chat. Real time chat is typically more usually a single line entry. Having auto-complete on that is irritating and utterly spoils the UI.
Re:“autocomplete=off is ignored on non-login input elements” by tracker1 on Wednesday June 15, 2016 @05:24PM (#11912254)
The irony is when I have to hand-enter my email address, especially on my phone, I'm far more likely to mistype it and make a mistake... And on the receiving side, I'm sick of seeing emails for someone else.
Re:“autocomplete=off is ignored on non-login input elements” by gkya on Wednesday June 15, 2016 @05:04PM (#11912131)
> There's very few occasions when autocomplete being disabled makes sense

What are those (seriously, I can't think of any off the top of my head).

Re:“autocomplete=off is ignored on non-login input elements” by chillacy on Wednesday June 15, 2016 @05:25PM (#11912256)
I know of one from a previous project. We had a prompt that said "enter your home address" with JavaScript autocomplete using google location APIs. Unfortunately chrome would try to auto fill this box with a city name (not even the full address) and this auto fill prompt sat on top of the JS drop down.
Re:“autocomplete=off is ignored on non-login input elements” by gkya on Wednesday June 15, 2016 @07:17PM (#11912840)
Wouldn't making it a textarea w/ rows=1 work? AFAIK textarea is not completed.
Re:“autocomplete=off is ignored on non-login input elements” by kalleboo on Wednesday June 15, 2016 @08:59PM (#11913291)
So we're back to hacks to replicate a feature that browser developers have decided to ignore? Gotta love web technology.

If "just use a textarea" is a valid solution, why did Google even bother not honoring autocomplete?

Re:“autocomplete=off is ignored on non-login input elements” by gkya on Wednesday June 15, 2016 @09:28PM (#11913390)
Well, the web technology is a pile of sh.t and in this case with the textarea you don't put your hands as deep in to is as you'd with the text input. That's how I interact with the web technology.
Re:“autocomplete=off is ignored on non-login input elements” by kalleboo on Wednesday June 15, 2016 @10:06PM (#11913498)
It's just amusing, that's all.

Prediction for the future:

1. Google implements auto-complete for one-line textareas

2. Web developers create textareas with 2 lines but hide the bottom line with CSS and disable the return key

3. Something so diabolical even I can't think of it

Re:“autocomplete=off is ignored on non-login input elements” by chillacy on Thursday June 16, 2016 @02:07AM (#11914325)
Yea that's a good idea. I don't like it because it's hacky, but if that's the only option... ¯\_(ツ)_/¯
Re:“autocomplete=off is ignored on non-login input elements” by ori_b on Thursday June 16, 2016 @12:34PM (#11917200)
That's a bug in autocompletion -- if it had autofilled correctly, with the full address -- there would be no discussion here.

If autocompletion had worked as intended, everyone would be happier than if it was disabled.

Re:“autocomplete=off is ignored on non-login input elements” by MikeTV on Wednesday June 15, 2016 @05:31PM (#11912300)
In our user management portal, whenever tech support opens the Create New User or Reset User Password page Chrome helpfully fills their administrative password into the user's password field.
Re:“autocomplete=off is ignored on non-login input elements” by gkya on Wednesday June 15, 2016 @07:16PM (#11912832)
So in your user management portal, you assign new users or replace your lost passwords with passwords you set, thus you know? Oh my days! Generate it randomly and mail the user, or better, mail them a link to reset/create password page. Otherwise, just make it a plain input field, because if you know it, it's not hidden anyways.
Re:“autocomplete=off is ignored on non-login input elements” by MikeTV on Thursday June 16, 2016 @09:38AM (#11915972)
Every hurdle vs. proper security has been non-technical. Slowly making progress :-)
Re:“autocomplete=off is ignored on non-login input elements” by IanCal on Thursday June 16, 2016 @01:05AM (#11914126)
Any search box where you want to hit a backend server and do typeahead searching.

Edit - for a good example, google use it on their search box.