components icon indicating copy to clipboard operation
components copied to clipboard

fix(autocomplete): form control being marked as touched too early when clicking on an option

Open crisbeto opened this issue 7 years ago • 1 comments

Currently we mark the autocomplete form control as touched on every blur event. This can be an issue for the case where a control is being validated on blur, because the input becomes blurred as soon as the user has their pointer down on something else (e.g. one of the options). This will cause validation to run before the value has been assigned. With these changes we switch to marking the control as touched once the panel has been closed.

Fixes #11903.

crisbeto avatar Jun 24 '18 09:06 crisbeto

Failing a number of google3 tests because tests were testing for errors on blur. Will probably have to individually change the tests to actually touch the form control.

annieyw avatar Oct 14 '20 22:10 annieyw