jquery-ui icon indicating copy to clipboard operation
jquery-ui copied to clipboard

autocomplete="off" is not sufficient anymore

Open mokraemer opened this issue 4 years ago • 7 comments

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 avatar Sep 22 '21 12:09 mokraemer

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

melloware avatar Sep 22 '21 13:09 melloware

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" :(

mokraemer avatar Sep 22 '21 15:09 mokraemer

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

lebbe avatar Sep 27 '21 14:09 lebbe

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 avatar Sep 27 '21 15:09 mokraemer

https://bugs.chromium.org/p/chromium/issues/detail?id=1133769

skaestle avatar Mar 09 '22 15:03 skaestle

nice post. thanks

mokraemer avatar Mar 09 '22 15:03 mokraemer

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.

dominik5566 avatar Mar 16 '23 11:03 dominik5566