primeng icon indicating copy to clipboard operation
primeng copied to clipboard

Chrome doesn't respect the autocomplete property of the p-autocomplete component

Open francovegini opened this issue 7 years ago • 10 comments

[X] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

Current behavior The p-autocomplete component has the autocomplete attribute set to off by default. However, even with this value, Google Chrome's autocompletion is still displayed, causing the problem shown in the third image (Chrome's autocompletion appears over the component list).

inspect_element

chrome_autofill

image

Expected behavior The expected behavior is Google Chrome's autocompletion not being displayed, but after some research, I found out that Chrome ignores the autocomplete property when it is set to "off".

To fix this, I created a new @input in the p-autocomplete component and associated the autocomplete HTML property with it, in a way that the developer is able to send a value that actually disables Chrome's autocompletion.

Please take a look at PR #8097

References: https://stackoverflow.com/questions/15738259/disabling-chrome-autofill https://bugs.chromium.org/p/chromium/issues/detail?id=370363#c7

  • Angular version: 7.X

  • PrimeNG version: 7.X

  • Browser: [Chrome]

  • Language: [all]

francovegini avatar Aug 27 '19 17:08 francovegini

+1

csvinhal avatar Sep 09 '19 18:09 csvinhal

+1

sidneibiz avatar Sep 09 '19 18:09 sidneibiz

+1

marcoshevaristo avatar Sep 12 '19 22:09 marcoshevaristo

+1

falexandre avatar Sep 13 '19 11:09 falexandre

+1

hemanuelx avatar Sep 13 '19 11:09 hemanuelx

+1

philipstefan avatar Sep 13 '19 11:09 philipstefan

Fixed in https://github.com/primefaces/primeng/commit/f539e1bac75c18337f6ad77f19a017a9e271458a

yigitfindikli avatar Oct 03 '19 13:10 yigitfindikli

I think I have a solution for autocomplete, since it still doesn't work. As of 2018, you have to change autocomplete="new-password" instead of autocomplete="off" for it to work (autocomplete="off" doesn't work any more). Checked it, changed it in my project and it works. Hope you will fix this soon

lazovic6 avatar Oct 04 '19 08:10 lazovic6

Still not fixed, prime-ng 11.4.2

StruninIhor avatar Jun 07 '21 09:06 StruninIhor

+1

jacekzwroclawia avatar Jan 03 '22 13:01 jacekzwroclawia