google-maps-autocomplete icon indicating copy to clipboard operation
google-maps-autocomplete copied to clipboard

autocomplete="off" on adress-search input should be removed

Open wottpal opened this issue 5 years ago • 3 comments

For two reasons autocomplete="off" on adress-search input should be removed:

  1. autocomplete="off" is ignored for historical reasons and therefore useless. The new way to disable autofill in Chrome is autocomplete="chrome-off" (see here)
  2. The user should be able to overwrite the autocomplete value. (I set autocomplete="chrome-off" on my matGoogleMapsAutocomplete-input but it is ignored and overwritten by autocomplete="off")

Thank you very much!

wottpal avatar Oct 15 '20 07:10 wottpal

@wottpal can you please tell me where am I using autocomplete="off" ??

AnthonyNahas avatar Jul 13 '21 09:07 AnthonyNahas

Hi, I have found this issue as well. I'm not sure where in the code you have it but the rendered input ends up with autocomplete="off" even if I have set this to something else. I tried this with the directive and component.

<input _ngcontent-mmg-c377="" matinput="" matvalidateaddress="" required="" class="mat-input-element mat-form-field-autofill-control form-control ng-tns-c109-12 cdk-text-field-autofill-monitored pac-target-input ng-dirty ng-touched ng-valid" ng-reflect-required="" ng-reflect-placeholder="Please enter the address" id="mat-input-7" placeholder="Please enter the address" aria-invalid="false" aria-required="true" autocomplete="off" ng-reflect-model="2132">

tljesse avatar Jul 15 '21 14:07 tljesse

Hi, also having this issue.

I had to hide the field dynamically and introduce a "+ Add Address" button within my angular app because the required flag is being forced as well, except I'm not using the map element, just the input element to help users suggestions.

Can we please make the required and autocomplete params overridable?

Greatly appreciated!

Elie Kassouf

eliegkassouf avatar Jul 15 '21 16:07 eliegkassouf