-
Notifications
You must be signed in to change notification settings - Fork 6.8k
fix(menu): set appropriate origin when restoring focus #9303
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): set appropriate origin when restoring focus #9303
Conversation
jelbourn
left a comment
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
30cced2 to
b9b329d
Compare
|
Included the |
| /** Focuses the menu trigger. */ | ||
| focus() { | ||
| this._element.nativeElement.focus(); | ||
| focus(origin: FocusOrigin = 'program') { |
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.
Needs a @param JsDoc
| // when clicking on the backdrop. | ||
| if (!this._openedByMouse || !this.triggersSubmenu()) { | ||
| if (!this._openedByMouse) { | ||
| this.focus(); |
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 that focus style will show for both program and keyboard, so we don't have to specify which?
Sets the correct focus origin depending on the way a menu has been opened. Fixes angular#9292.
b9b329d to
612d98b
Compare
Sets the correct focus origin depending on the way a menu has been opened. Fixes angular#9292.
|
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. |
Sets the correct focus origin depending on the way a menu has been opened.
Fixes #9292.