Skip to content

Commit

Permalink
upgrade to use "ArrowLeft" etc. not "Left", refs ibm-js/delite#433
Browse files Browse the repository at this point in the history
  • Loading branch information
wkeese committed Nov 19, 2015
1 parent 0ce8aa4 commit baf74b1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Combobox.js
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ define([
evt.stopPropagation();
evt.preventDefault();
}
} else if (evt.key === "Down" || evt.key === "Up" ||
} else if (evt.key === "ArrowDown" || evt.key === "ArrowUp" ||
evt.key === "PageDown" || evt.key === "PageUp" ||
evt.key === "Home" || evt.key === "End") {
if (this._useCenteredDropDown()) {
Expand Down
8 changes: 4 additions & 4 deletions Slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -519,17 +519,17 @@ define([
case "End":
newValue = (e.target === this.handleMin) ? currentVal[1] : this.max;
break;
case "Right":
case "ArrowRight":
multiplier = -1;
/* falls through */
case "Left":
case "ArrowLeft":
newValue = parseFloat(currentVal[idx]) +
multiplier * ((this.flip && !this.vertical) ? this.step : -this.step);
break;
case "Down":
case "ArrowDown":
multiplier = -1;
/* falls through */
case "Up":
case "ArrowUp":
newValue = parseFloat(currentVal[idx]) +
multiplier * ((!this.flip || !this.vertical) ? this.step : -this.step);
break;
Expand Down
8 changes: 4 additions & 4 deletions StarRating.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,18 +190,18 @@ define([
},

_keyDownHandler: function (/*Event*/ event) {
var incrementArrow = this.effectiveDir === "ltr" ? "Right" : "Left",
decrementArrow = this.effectiveDir === "ltr" ? "Left" : "Right";
var incrementArrow = this.effectiveDir === "ltr" ? "ArrowRight" : "ArrowLeft",
decrementArrow = this.effectiveDir === "ltr" ? "ArrowLeft" : "ArrowRight";

switch (event.key) {
case incrementArrow:
case "Up":
case "ArrowUp":
case "Add":
event.preventDefault();
this._incrementValue();
break;
case decrementArrow:
case "Down":
case "ArrowDown":
case "Subtract":
event.preventDefault();
this._decrementValue();
Expand Down

0 comments on commit baf74b1

Please sign in to comment.