1

I have an address form where for the "state" two letter code, I use material-ui SelectField. Problem is that this SelectField does not autofill with the correct state code, when the browser proposes an autofill address. All other text fields (address, city, zip-code) autofill correctly. I've tested this with Chrome/Firefox/IE/Edge/Safari.

You can test my code here: https://gmacciocca.github.io/coffee-with-congress

asked Mar 6, 2017 at 2:03

1 Answer 1

1

This is because SelectField is composed of <div>s etc. rather than using a native <select> form element.

A hidden shadow element could in theory be used to capture the input, buts some browser don't trigger DOM events on autofill as a security precaution, so it wouldn't be possible to determine that a value had been provided without continuous polling.

This is the same issue we have with the text field label not animating on autofill.

answered Mar 11, 2017 at 18:12
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.