-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(list-key-manager): remove handling for home and end keys #4544
fix(list-key-manager): remove handling for home and end keys #4544
Conversation
I did a quick survey of Google Search, GMail, Drive, and this accessible autocomplete for US government web sites. For all of them, the home/end keys always apply to the text input no mater what state you're in. I think we should just follow this pattern, since it will be simpler and follow conventions. |
d56e5d2
to
0083b9c
Compare
Done @jelbourn. I removed it from the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, one minor comment
let TAB_EVENT: KeyboardEvent; | ||
let HOME_EVENT: KeyboardEvent; | ||
let END_EVENT: KeyboardEvent; | ||
let EVENTS: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about just fakeKeyEvents
? It's not constant since you write the value in beforeEach
.
0083b9c
to
86229f4
Compare
* Removes the handling for the home and end keys from the ListKeyManager since their usage isn't as generic as the arrow keys. * Adds the home and end key handling to the select specifically. * Reworks the Autocomplete, ListKeyManager and ChipList tests to use the `createKeyboardEvent`, instead of making their own fake keyboard events. * Adds a `target` parameter to the `createKeyboardEvent` function, allowing us to define the event target. Fixes angular#3496.
86229f4
to
3cf0f7d
Compare
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
createKeyboardEvent
, instead of making their own fake keyboard events.target
parameter to thecreateKeyboardEvent
function, allowing us to define the event target.Fixes #3496.