Handles keyboard events coming from the overlay.
(event: KeyboardEvent)
| 981 | |
| 982 | /** Handles keyboard events coming from the overlay. */ |
| 983 | protected _handleOverlayKeydown(event: KeyboardEvent): void { |
| 984 | // TODO(crisbeto): prior to #30363 this was being handled inside the overlay directive, but we |
| 985 | // need control over the animation timing so we do it manually. We should remove the `keydown` |
| 986 | // listener from `.mat-mdc-select-panel` and handle all the events here. That may cause |
| 987 | // further test breakages so it's left for a follow-up. |
| 988 | if (event.keyCode === ESCAPE && !hasModifierKey(event)) { |
| 989 | event.preventDefault(); |
| 990 | this.close(); |
| 991 | } |
| 992 | } |
| 993 | |
| 994 | _onFocus() { |
| 995 | if (!this.disabled) { |
nothing calls this directly
no test coverage detected