autocomplete: change md-escape-options default to 'clear' #11767
Description
Proposal
CodePen and steps to reproduce the issue:
CodePen Demo which demonstrates the issue:
https://material.angularjs.org/1.1.19/demo/autocomplete
Detailed Reproduction Steps:
- Click the first autocomplete
- type
a
- press the down arrow
- press the Escape key
What is the expected behavior?
The pop-up is closed and the input is cleared. Focus remains on the autocomplete's input.
This maps to using md-escape-options="clear"
, but this isn't currently the default behavior.
What is the current behavior?
The pop-up is closed and the input is cleared. The autocomplete's input is blurred resulting in focus being sent to the body
in Chrome.
This is related to our API md-escape-options
:
Override escape key logic. Default is
blur clear
. Options:blur, clear, none
.
What is the use-case or motivation for changing an existing behavior?
Align with the WAI-ARIA Authoring Practices
Which versions of AngularJS, Material, OS, and browsers are affected?
- AngularJS: 1.7.8
- AngularJS Material: 1.1.19
- OS: macOS
- Browsers: Chrome 75
Is there anything else we should know? Stack Traces, Screenshots, etc.
We would like feedback from users and developers on whether this change in the default Escape
key behavior would be problematic.
We plan to create a PR for this and base our decision to move forward with it on the results of the g3 presubmit and user/developer feedback.