Skip to content

Commit

Permalink
Merge pull request #119 from dominicfraser/master
Browse files Browse the repository at this point in the history
prevent default page scroll when using ArrowUp/ArrowDown
  • Loading branch information
mpowaga authored Feb 28, 2018
2 parents d8d7b56 + db254db commit 9a158e7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions react-slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -545,9 +545,11 @@
switch (e.key) {
case "ArrowLeft":
case "ArrowUp":
e.preventDefault();
return this._moveDownOneStep();
case "ArrowRight":
case "ArrowDown":
e.preventDefault();
return this._moveUpOneStep();
case "Home":
return this._move(this.props.min);
Expand Down

0 comments on commit 9a158e7

Please sign in to comment.