3

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.

Example image showing the Material Autocomplete popup overlapping the browser autocomplete

geisterfurz007
  • 4,398
  • 5
  • 34
  • 51
BlueCloud
  • 433
  • 2
  • 4
  • 15

3 Answers3

3

its also working

<input type="search" />
BlueCloud
  • 433
  • 2
  • 4
  • 15
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,593
  • 2
  • 21
  • 38
1

I got the solution using jQuery.

$(document).ready(function(){
    $("#origin_postal").attr("autocomplete", "disabled");
});
geisterfurz007
  • 4,398
  • 5
  • 34
  • 51
BlueCloud
  • 433
  • 2
  • 4
  • 15