Subscribe to the MenuStack closed events.
()
| 355 | |
| 356 | /** Subscribe to the MenuStack closed events. */ |
| 357 | private _subscribeToMenuStackClosed() { |
| 358 | if (!this._parentMenu) { |
| 359 | this.menuStack.closed.subscribe(({focusParentTrigger}) => { |
| 360 | if (focusParentTrigger && !this.menuStack.length()) { |
| 361 | this._elementRef.nativeElement.focus(); |
| 362 | } |
| 363 | }); |
| 364 | } |
| 365 | } |
| 366 | |
| 367 | /** Sets the role attribute for this trigger if needed. */ |
| 368 | private _setRole() { |
no test coverage detected