DigitalRiver / react-atlas

Composable React components with CSS Modules.
http://digitalriver.github.io/react-atlas/
MIT License
38 stars 25 forks source link

Dropdown: autocomplete attribute needs to be set to something other than "off" to block browser autofill in Chrome #925

Open Darper opened 5 years ago

Darper commented 5 years ago

I haven't been able to reproduce in the docs site, but Chrome doesn't stop the browser's autocomplete functionality if you just set autocomplete="off". There are a few suggested solutions, the only one I could find officially from the Chrome team though is to set autocomplete to "new-password". https://bugs.chromium.org/p/chromium/issues/detail?id=370363#c7. This fix will take some testing, because I've also seen comments saying that once you've used a custom string it will stop blocking autocomplete the next time the page loads.

Once a new value is determined, the fix is to change the defaultProp in Dropdown.js.