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

autocomplete="off" is not sufficient anymore #1982

Open
mokraemer opened this issue Sep 22, 2021 · 7 comments
Open

autocomplete="off" is not sufficient anymore #1982

mokraemer opened this issue Sep 22, 2021 · 7 comments

Comments

@mokraemer
Copy link

e.g. in component autocomplete, the attribute autocomplete is set to off to prevent the browser from autofilling. In many cases the browser ignores this attribute with "off". It looks like setting "one-time-code" will prevent it from autofilling.

@mokraemer mokraemer changed the title autocomplete="off" is not sufficient any more Sep 22, 2021
@melloware
Copy link

It loos like that is Apple IOS and Mac only? https://robindirksen.com/blog/html-autocomplete-one-time-code

@mokraemer
Copy link
Author

nope. chrome shows autocompletion of predefined user data (e.g. my adress and others). With this setting it disappears.
Most browsers just ignore the setting "off" and handle them as "not set" :(

@lebbe
Copy link

lebbe commented Sep 27, 2021

You need to set autocomplete="off" on the surrounding form tag as well, for Chrome to respect this attribute. Chrome ignores it if only placed on the input element itself (and the developers know about it https://bugs.chromium.org/p/chromium/issues/detail?id=914451).

@mokraemer
Copy link
Author

I've reverted my change - it has other implications.

The problem results from the label "Name" if other labels in (any?) other form have the name "street" or anything. Looks like chrome thinks it is super intelligent :(
renaming the label helped....

@mokraemer
Copy link
Author

nice post. thanks

@dominik5566
Copy link

dominik5566 commented Mar 16, 2023

It would be nice if this was fixed. Currently this is the best resource on StackOverflow on this topic
https://stackoverflow.com/questions/15738259/disabling-chrome-autofill

If it is not possible to solve this by setting autocomplete="new-selectbox-item" or similar, which worked for me, then I would suggest to at least not override the attribute if it is already set on the input field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment