Autofill is changing how my form behaves

A checkout form I am working on behaves normally when I type into it, but browser autofill creates a weird state where some labels do not move and validation does not run until the field gets focus.

I had been treating `input` and `change` events as if they covered every way a value could appear. Apparently not. I can patch around the visual problem, but I would rather understand whether autofill should be treated as its own case or whether the form architecture is too dependent on events in the first place.

  • forms
  • autofill
  • frontend
  • browsers
65

6 replies · Sort: Best

Best

No conversations include a reply from the original poster.