Skip to content
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(cdk/tree): CdkTreeNodeToggle focuses node when toggling it #1

Closed

Conversation

zarend
Copy link
Owner

@zarend zarend commented Aug 10, 2023

Fix focus behavior of CdkTreeNodeToggle. When toggling the expanded or collapsed state of a node, focus that node. Fix issue where end user cannot tab into tree component when collaping the parent of the active node.

Before this commit is applied, there is a bug where end user cannot tab into the tree.

Reproduction steps

  1. Active a tree node
  2. (focus state renders)
  3. Using mouse, collapse parent of node from step 1.
  4. (tree node collapses)
  5. Press Tab, then shift + tab
  6. (item before tree is focused. Can tab into the tree)

With this commit applied, above issue is no longer expected to reproduce.

This commit message is only for reviewers of this PR and can be deleted when landing this change in main.

@zarend
Copy link
Owner Author

zarend commented Aug 10, 2023

cc @andrewseguin @BobobUnicorn. I don't seem to have a way to request a review from you

Fix focus behavior of CdkTreeNodeToggle. When toggling the expanded or
collapsed state of a node, focus that node. Fix issue where end user
cannot tab into tree component when collaping the parent of the active
node.

Before this commit is applied, there is a bug where end user cannot tab
into the tree.

Reproduction steps
1. Active a tree node
2. (focus state renders)
3. Using mouse, collapse parent of node from step 1.
4. (tree node collapses)
5. Press Tab, then shift + tab
6. (item before tree is focused. Can tab into the tree)

With this commit applied, above issue is no longer expected to
reproduce.

This commit message is only for reviewers of this PR and can be deleted
when landing this change in main.
@zarend zarend force-pushed the cdk-tree-revamp-focus-on-expand-collapse branch from c5f6c6e to c80f400 Compare August 10, 2023 20:36
@zarend zarend closed this Aug 11, 2023
@zarend
Copy link
Owner Author

zarend commented Aug 11, 2023

Closing in favor of angular#27631

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant