You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[autocomplete] Option to opt out of Escape clearing the input value #4245
component: autocompleteChanges related to the autocomplete component.has workaroundThere’s a bug, but users have a complete workaround, so no urgent fix or release is needed.type: new featureExpand the scope of the product to solve a new problem.
When the Autocomplete popup is closed and the user presses Escape, the input value is cleared. Is it possible to opt out of this behavior?
For Autocomplete use cases, the input value is often free-form text (e.g. a URL, an address) where suggestions are helpful but the typed value is the primary content. Clearing it on Escape is unexpected — users typically do not expect Escape to erase their input.
From a glance at the source code, this behavior appears to be inherited from the Combobox implementation.
This makes sense for Combobox, where the input reflects a selected value that should be resettable. This is not always true for Autocomplete use cases that sometimes behave more like normal inputs, where some users won't ever trigger open the suggestions popover. The APG also says that clearing the input is "optional".
A clearOnEscape prop or similar would let consumers preserve the input value.
changed the title [-][Autocomplete] Option to opt out of Escape clearing the input value[/-][+][autocomplete] Option to opt out of Escape clearing the input value[/+]on Mar 3, 2026
component: autocompleteChanges related to the autocomplete component.has workaroundThere’s a bug, but users have a complete workaround, so no urgent fix or release is needed.type: new featureExpand the scope of the product to solve a new problem.
Activity
linear commentedon Mar 3, 2026
BAS-443
[-][Autocomplete] Option to opt out of Escape clearing the input value[/-][+][autocomplete] Option to opt out of Escape clearing the input value[/+]atomiks commentedon Mar 10, 2026
The
cancel()method should work:The behavior here was to match the Chrome URL omnibox which clears the value as well