-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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(menu): always focus first menu item #9383
Conversation
src/lib/menu/menu-directive.ts
Outdated
*/ | ||
focusFirstItem() { | ||
this._keyManager.setFirstItemActive(); | ||
focusFirstItem(origin: FocusOrigin) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be option to avoid a breaking change?
super(); | ||
|
||
if (_focusMonitor) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a comment here like
// We want to show the focus style for menu items only when the focus was not caused by
// a mouse or touch interaction.
?
5879ffb
to
757e482
Compare
Addressed the feedback @jelbourn. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Actually it looks like CircleCI is raising a compilation error |
757e482
to
e59df4f
Compare
ops, it's sorted out now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* Switches to always focusing the first menu item, even when opening by mouse. The focus styling will only apply when focused by keyboard. * Adds the ability to set the focus origin through the `FocusKeyManager`. Fixes angular#9252.
e59df4f
to
4a8bf7d
Compare
Fixes an e2e test that is failing after angular#9383.
Fixes an e2e test that is failing after #9383.
Fixes an e2e test that is failing after #9383.
Fixes an e2e test that is failing after angular#9383.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
FocusKeyManager
.Fixes #9252.