canvas-kit icon indicating copy to clipboard operation
canvas-kit copied to clipboard

Preview Select doesn't support autofill/autocomplete

Open jamesfan opened this issue 5 years ago • 1 comments

🐛 Bug Report

The Preview Select doesn't support the browser autofill/autocomplete feature: https://developers.google.com/web/fundamentals/design-and-ux/input/forms#use_metadata_to_enable_auto-complete

To Reproduce

View this CodeSandbox: https://codesandbox.io/s/select-autofill-mm6vv (this pulls from an older version of Select which was still a Labs component, but the issue still applies)

Ensure autofill is enabled in your browser and that you have an address saved. Start typing your address into the Street Address field. Select the option to autofill the remaining fields with your address. Street Address, Zip Code, and State will autofill, but State (Labs) will not.

Expected Behavior

The State (Labs) Select should autofill as well.

jamesfan avatar Jul 16 '20 01:07 jamesfan

The Adobe Spectrum team handled this by rendering a hidden native select behind the scenes and handling its onChange event: https://youtu.be/dxDcBB7Xoxs?t=393

jamesfan avatar Jul 16 '20 01:07 jamesfan