angular-material-extensions / google-maps-autocomplete

Autocomplete input component and directive for google-maps built with angular and material design |
https://angular-material-extensions.github.io/google-maps-autocomplete
MIT License
169 stars 60 forks source link

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

Closed wottpal closed 5 months ago

wottpal commented 3 years ago

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!

AnthonyNahas commented 3 years ago

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

tljesse commented 3 years ago

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">
eliegkassouf commented 3 years ago

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