(e: KeyboardEvent)
| 312 | } |
| 313 | |
| 314 | _onKeyUp(e: KeyboardEvent) { |
| 315 | const target = e.target as Button; |
| 316 | if (this._isArrowKeyAction(e)) { |
| 317 | e.preventDefault(); |
| 318 | this._activeArrowButton = false; |
| 319 | return; |
| 320 | } |
| 321 | |
| 322 | if (isSpace(e)) { |
| 323 | e.preventDefault(); |
| 324 | e.stopPropagation(); |
| 325 | this._textButtonActive = false; |
| 326 | if (!this._shiftOrEscapePressedDuringSpace) { // Do not fire click if Arrow button is focused by mouse and Space is pressed afterwards |
| 327 | if (target !== this.arrowButton) { |
| 328 | this._fireClick(); |
| 329 | } else { |
| 330 | this._fireArrowClick(); |
| 331 | } |
| 332 | } |
| 333 | |
| 334 | this._shiftOrEscapePressedDuringSpace = false; |
| 335 | return; |
| 336 | } |
| 337 | |
| 338 | const shouldToggleTextButtonActiveStateOff = isEnter(e) || (isShift(e) && this._textButtonActive); |
| 339 | |
| 340 | if (shouldToggleTextButtonActiveStateOff) { |
| 341 | this._textButtonActive = false; |
| 342 | } |
| 343 | } |
| 344 | |
| 345 | _resetActionButtonStates() { |
| 346 | this._activeArrowButton = false; |
nothing calls this directly
no test coverage detected