Closed
Description
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
No response
Description
After selecting an option from autocomplete before the focus is lost, if a single character is deleted, the component will not clear out the input and deselect the option. If two or more characters are deleted, the component works as normal.
Reproduction
StackBlitz link: https://material.angular.io/components/autocomplete/overview#require-an-option-to-be-selected
Steps to reproduce:
- Click into autocomplete input.
- Select an option.
- Before losing focus on input, backspace once.
- Navigate away from input.
- Partial value will remain with the option still selected.
Expected Behavior
If user modifies value when requireSelection is set to true, the value on the input should always clear and the selected option should be deselected.
Actual Behavior
Value on input is not cleared and the option is not deselected.
Environment
- Angular:
- CDK/Material: 17.0.5
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): Windows