In angular material, material autocomplete is working fine, but the browser auto fill options are overlapping the material autocomplete popup. How to turn off autocomplete for a specific application without turning off browser auto-fill? Reference image attached.
Asked
Active
Viewed 958 times
4

geisterfurz007
- 5,292
- 5
- 33
- 54

BlueCloud
- 523
- 2
- 5
- 15
-
1autocomplete="off" add in the input field – UI_Dev Nov 26 '18 at 07:23
-
i tried this option but its not working – BlueCloud Nov 26 '18 at 07:24
-
try `autocomplete="somerandomstringthatdoesntmakesense"` – karoluS Nov 26 '18 at 07:26
-
https://www.pcworld.com/article/3145489/browsers/how-to-clear-unwanted-autofill-entries-in-google-chrome.html – Negi Rox Nov 26 '18 at 07:27
-
its not your code problem its browser problem – Negi Rox Nov 26 '18 at 07:27
-
i will try this and update – BlueCloud Nov 26 '18 at 07:30
-
@karoluS I tried this, but the latest updated browser are not looking for any parameters in autocomplete property. This is not working nowadays – BlueCloud Nov 26 '18 at 07:33
-
@BlueCloud then i got to verify my production applications. I'm using `autocomplete="dont-fill-me-up"` and it prevent autocomplete. What browser are you using? – karoluS Nov 26 '18 at 07:36
-
Version 65.0.3325.146 (Official Build) (64-bit) – BlueCloud Nov 26 '18 at 08:22
3 Answers
2
If you want to prevent browser (especially chrome) autocomplete trigger on an input you'd have to override its default behaviour. Google doesn't respect autocomplete="off"
. From my experience thing that always worked was using this autocomplete="randomstring"
, but this is more of a workaround that a solution. You might find more ways to disable it here.

karoluS
- 2,980
- 2
- 23
- 44
1
I got the solution using jQuery.
$(document).ready(function(){
$("#origin_postal").attr("autocomplete", "disabled");
});

geisterfurz007
- 5,292
- 5
- 33
- 54

BlueCloud
- 523
- 2
- 5
- 15