Ensures the option is selected when activated from the keyboard.
(event: KeyboardEvent)
| 228 | |
| 229 | /** Ensures the option is selected when activated from the keyboard. */ |
| 230 | _handleKeydown(event: KeyboardEvent): void { |
| 231 | if ((event.keyCode === ENTER || event.keyCode === SPACE) && !hasModifierKey(event)) { |
| 232 | this._selectViaInteraction(); |
| 233 | |
| 234 | // Prevent the page from scrolling down and form submits. |
| 235 | event.preventDefault(); |
| 236 | } |
| 237 | } |
| 238 | |
| 239 | /** |
| 240 | * `Selects the option while indicating the selection came from the user. Used to |
nothing calls this directly
no test coverage detected