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