4

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
  • 5,292
  • 5
  • 33
  • 54
BlueCloud
  • 523
  • 2
  • 5
  • 15

3 Answers3

3

its also working

<input type="search" />
BlueCloud
  • 523
  • 2
  • 5
  • 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,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