Skip to content

fix(selection-list): incorrectly handling A key in some cases #18513

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

Merged
merged 1 commit into from
Feb 20, 2020

Conversation

crisbeto
Copy link
Member

Fixes a couple of issues related to how the selection list handles the "A" key:

  1. The typeahead doesn't work for the "A" key. It's because we were intercepting it earlier to support the "Select all" functionality.
  2. Disables the ctrl + A shortcut in single selection mode, because it only makes sense during multi selection.

@crisbeto crisbeto added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: patch This PR is targeted for the next patch release labels Feb 15, 2020
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Feb 15, 2020
@@ -337,35 +337,35 @@ describe('MatSelectionList without forms', () => {
it('should restore focus if active option is destroyed', () => {
const manager = selectionList.componentInstance._keyManager;

spyOn(listOptions[2].componentInstance, 'focus').and.callThrough();
listOptions[3].componentInstance._handleFocus();
spyOn(listOptions[3].componentInstance, 'focus').and.callThrough();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of these unrelated tests had to be tweaked, because I added an extra option to one of the fixtures.

Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, add merge-ready when ready

Fixes a couple of issues related to how the selection list handles the "A" key:
1. The typeahead doesn't work for the "A" key. It's because we were intercepting it earlier to support the "Select all" functionality.
2. Disables the ctrl + A shortcut in single selection mode, because it only makes sense during multi selection.
@crisbeto crisbeto force-pushed the selection-list-a-key branch from 2b0998a to 3566209 Compare February 18, 2020 20:06
@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label Feb 18, 2020
@andrewseguin andrewseguin merged commit ff0de11 into angular:master Feb 20, 2020
@andrewseguin andrewseguin added target: minor This PR is targeted for the next minor release and removed target: patch This PR is targeted for the next patch release labels Feb 20, 2020
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Mar 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants