Downshift: [bug] autocomplete="nope" is ignored by browsers

Created on 24 Jul 2018  路  11Comments  路  Source: downshift-js/downshift

  • downshift version: 2.0.18

What happened:

The attribute autocomplete="nope", set by downshift, is ignored in Chrome 67 and Opera 54 (latest at the time of writing). However autocomplete="off" on the input would work.

Problem description:
Cant deactivate the browsers auto complete what is really annoying when using the auto suggest menu.

Suggested solution:
use autocomplete="off" or provide possibility to override the value.

UPDATE: can be overwritten by passing autoComplete: "off" to getInputProps

Most helpful comment

Hi,
I had the same issue created a pull request -> #528

All 11 comments

You know, we originally had off set and recently "fixed" this bug where it was ignored. Then I think the browsers updated to start honoring it because I started seeing autocomplete on downshift inputs. So I think we need to revert the fix. Could you make a pull request to change "nope" back to "off" ? Thanks!

Hi,
I had the same issue created a pull request -> #528

Ugh, I remember doing this back in my angular-Formly days. Can't really do this in downshift, but maybe we should add an example... Anyone interested?

For what it's worth, v2.0.19 (which included #528) seemed to fix the issue for me.

autoComplete: "nope" worked for me

but autoComplete: "off" didn't

Sorry, you'll have to go ahead and override that yourself.

I think this is resolved.

It seems you guys have changed this back to 'off' again...

From line 781 of downshift.js:

// revert back since autocomplete="nope" is ignored on latest Chrome and Opera
      autoComplete: 'off',

autoComplete 'off' doesn't work. Can you please change it to autoComplete '__nope' or any other random name so that it actually works?

Sorry @StupidSexyJake, that change didn't work for me. If you want "__nope" then you can set it yourself in getInputProps

Ohhh that's so easy! Sorry, my bad. I was adding it in the wrong area like so and it wasn't changing...

{renderInput({ autoComplete: '__nope', InputProps: getInputProps({ }), })}

Works perfectly by simply moving it to getInputProps... I'm not sure why it's not working for you though, seems to work fine for me although I've only tested on Chrome so far (Version 71.0.3578.98 for Windows).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yuripramos picture yuripramos  路  4Comments

klapouchy picture klapouchy  路  4Comments

the-simian picture the-simian  路  4Comments

mayk93 picture mayk93  路  3Comments

kohgpat picture kohgpat  路  3Comments