Handles focus landing on the host element of the menu.
()
| 264 | |
| 265 | /** Handles focus landing on the host element of the menu. */ |
| 266 | private _handleFocus() { |
| 267 | this._focusMonitor |
| 268 | .monitor(this.nativeElement, false) |
| 269 | .pipe(takeUntil(this.destroyed)) |
| 270 | .subscribe(origin => { |
| 271 | // Don't forward focus on mouse interactions, because it can |
| 272 | // mess with the user's scroll position. See #30130. |
| 273 | if (origin !== null && origin !== 'mouse') { |
| 274 | this.focusFirstItem(origin); |
| 275 | } |
| 276 | }); |
| 277 | } |
| 278 | } |
nothing calls this directly
no test coverage detected