-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(list-key-manager): don't handle home and end keys unless the user…
… is interacting with the element * Refactors the `ListKeyManager` to only handle the home and end keys after the user has interacted. A list becomes interactive if the previous keypress, that occurred inside it, was handled by the key manager. This allows us to continue supporting skipping to the first/last items with home/end, while also not blocking the default behavior in cases like the select where it can be useful when editing text. * 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 #3496.
- Loading branch information
Showing
5 changed files
with
187 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.