* Handler for up and down arrow keys * Increment or decrement the element value according to the `upDownStep` option chosen * * @param {KeyboardEvent} e
(e)
| 7644 | * @param {KeyboardEvent} e |
| 7645 | */ |
| 7646 | upDownArrowAction(e) { |
| 7647 | if (this.formulaMode || |
| 7648 | this.settings.readOnly || this.domElement.readOnly || this.domElement.disabled) { |
| 7649 | return; |
| 7650 | } |
| 7651 | |
| 7652 | let isUp = false; |
| 7653 | let isDown = false; |
| 7654 | if (this.eventKey === AutoNumericEnum.keyName.UpArrow) { |
| 7655 | isUp = true; |
| 7656 | } else if (this.eventKey === AutoNumericEnum.keyName.DownArrow) { |
| 7657 | isDown = true; |
| 7658 | } else { |
| 7659 | AutoNumericHelper.throwError('Something has gone wrong since neither an Up or Down arrow key is detected, but the function was still called!'); |
| 7660 | } |
| 7661 | |
| 7662 | this._wheelAndUpDownActions(e, isUp, isDown, this.settings.upDownStep); |
| 7663 | } |
| 7664 | |
| 7665 | /** |
| 7666 | * Handler for 'wheel' event |
no test coverage detected