Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] autocomplete="nope" is ignored by browsers #527

Closed
Mario-Eis opened this issue Jul 24, 2018 · 11 comments
Closed

[bug] autocomplete="nope" is ignored by browsers #527

Mario-Eis opened this issue Jul 24, 2018 · 11 comments

Comments

@Mario-Eis
Copy link

Mario-Eis commented Jul 24, 2018

  • 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

@kentcdodds
Copy link
Member

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!

@JCofman
Copy link
Contributor

JCofman commented Jul 24, 2018

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

kentcdodds pushed a commit that referenced this issue Jul 24, 2018
* fix autocomplete property

* update react native snapshot
@okonet
Copy link

okonet commented Jul 30, 2018

@kentcdodds
Copy link
Member

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?

@dallonf
Copy link
Contributor

dallonf commented Aug 28, 2018

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

@sibelius
Copy link

autoComplete: "nope" worked for me

but autoComplete: "off" didn't

@kentcdodds
Copy link
Member

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

Rendez pushed a commit to Rendez/downshift that referenced this issue Sep 30, 2018
* fix autocomplete property

* update react native snapshot
@kentcdodds
Copy link
Member

I think this is resolved.

@jakec-dev
Copy link

jakec-dev commented Jan 12, 2019

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?

@kentcdodds
Copy link
Member

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

@jakec-dev
Copy link

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants