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): capturing focus on load #29641

Merged
merged 1 commit into from
Aug 26, 2024
Merged

Commits on Aug 26, 2024

  1. fix(cdk/tree): capturing focus on load

    The tree implements a roving tabindex which needs to have an initial item with `tabindex = 0` to work correctly. This happens by waiting for the data to be initialized in the `TreeKeyManager` and focusing the active/first item. The problem is that this ends up stealing focus on load. We didn't notice this issue in the demo app, because all the tree are `visibility: hidden` since they're inside closed `mat-expansion-panel`, but the issue is visible in the docs site.
    
    These changes resolve the issue by setting the `tabindex` without actually moving focus.
    
    Fixes angular#29628.
    crisbeto committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    0c4538e View commit details
    Browse the repository at this point in the history