Use code instead of keyCode

old
rubenmoya 2018-02-21 20:29:08 +01:00
parent a7d0c5ba53
commit f8a7e88259
1 changed files with 3 additions and 3 deletions

View File

@ -153,9 +153,9 @@ const factory = (ProgressBar, Input) => {
const { ARROW_DOWN, ARROW_UP, ENTER, ESC } = KEYS;
if (disabled) return;
if ([ENTER, ESC].includes(event.keyCode)) this.inputNode.blur();
if (event.keyCode === ARROW_UP) this.addToValue(step);
if (event.keyCode === ARROW_DOWN) this.addToValue(-step);
if ([ENTER, ESC].includes(event.code)) this.inputNode.blur();
if (event.code === ARROW_UP) this.addToValue(step);
if (event.code === ARROW_DOWN) this.addToValue(-step);
};
handleMouseDown = (event) => {