Use code instead of keyCode
parent
a7d0c5ba53
commit
f8a7e88259
|
@ -153,9 +153,9 @@ const factory = (ProgressBar, Input) => {
|
||||||
const { ARROW_DOWN, ARROW_UP, ENTER, ESC } = KEYS;
|
const { ARROW_DOWN, ARROW_UP, ENTER, ESC } = KEYS;
|
||||||
|
|
||||||
if (disabled) return;
|
if (disabled) return;
|
||||||
if ([ENTER, ESC].includes(event.keyCode)) this.inputNode.blur();
|
if ([ENTER, ESC].includes(event.code)) this.inputNode.blur();
|
||||||
if (event.keyCode === ARROW_UP) this.addToValue(step);
|
if (event.code === ARROW_UP) this.addToValue(step);
|
||||||
if (event.keyCode === ARROW_DOWN) this.addToValue(-step);
|
if (event.code === ARROW_DOWN) this.addToValue(-step);
|
||||||
};
|
};
|
||||||
|
|
||||||
handleMouseDown = (event) => {
|
handleMouseDown = (event) => {
|
||||||
|
|
Loading…
Reference in New Issue