SAP / spartacus

Spartacus is a lean, Angular-based JavaScript storefront for SAP Commerce Cloud that communicates exclusively through the Commerce REST API.
Apache License 2.0
744 stars 389 forks source link

Safari autofill not working with ng-select #8341

Open Fonsu opened 4 years ago

Fonsu commented 4 years ago

Bug Description Autofill on Safari does not work with ng-select, specifically with [searchable]="true". The rest of the input fields are correctly autofilled but not the ng-select one. While the value seems to be correctly set and the form can be submitted, the selected country is not displayed to the user, the dropdown shows empty. This is bad UX.

To Reproduce Steps to reproduce the behavior:

  1. Go to /my-account/address-book
  2. Click on Add New Address
  3. Autofill the form using data from your Contacts app(make sure your address includes a country)
  4. The form gets correctly autofilled except for the country.

Expected behavior Country should be autofilled like the rest of the input fields.

Screenshots image

Desktop:

Additional context Happening on the latest develop. Removing [searchable]="true" to the ng-select element seems to work (Safari will ignore this input while autofilling the rest), but of course the search feature would be lost. [inputAttrs]="{ autocomplete: 'country-name' }" does not seem to change this behaviour.

Platonn commented 4 years ago

Perhaps a related issue of ng-select https://github.com/ng-select/ng-select/issues/269

Xymmer commented 4 years ago

to repro (check if it's just safari or other browsers too) and try to fix, reporter kindly provided suggestions

Zeyber commented 3 years ago

Bug is apparent also on Chrome. Will take breaking changes to fix.

giancorderoortiz commented 3 years ago

Changed priority to Minor per Safari's market share.