Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(nav-bar): improve focus behavior for click events (angular#11600)
<!-- Filling out this template is required! Do not delete it when submitting a Pull Request! Without this information, your Pull Request may be auto-closed. --> ## PR Checklist Please check that your PR fulfills the following requirements: - [x] The commit message follows [our guidelines](https://github.com/angular/material/blob/master/.github/CONTRIBUTING.md#-commit-message-format) - [x] Tests for the changes have been added or this is not a bug fix / enhancement - [x] Docs have been added, updated, or were not required ## PR Type What kind of change does this PR introduce? <!-- Please check the one that applies to this PR using "x". --> ``` [x] Bugfix [ ] Enhancement [ ] Documentation content changes [ ] Code style update (formatting, local variables) [ ] Refactoring (no functional changes, no api changes) [ ] Build related changes [ ] CI related changes [ ] Infrastructure changes [ ] Other... Please describe: ``` ## What is the current behavior? Clicking on nav items with a mouse causes the focus to move to the previously clicked nav item instead of the newly clicked nav item. <!-- Please describe the current behavior that you are modifying and link to one or more relevant issues. --> Issue Number: Fixes angular#11591. Relates to angular#11494. Closes angular#11598. ## What is the new behavior? - Focus is moved to the new nav item after it is clicked. - remove hover style that is inconsistent with spec - add test from @codymikol ## Does this PR introduce a breaking change? ``` [ ] Yes [x] No ``` <!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. --> <!-- Note that breaking changes are highly unlikely to get merged to master unless the validation is clear and the use case is critical. --> ## Other information Thank you to @codymikol for doing the initial investigation into this regression!
- Loading branch information