Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
feat(radioGroup): add up/down arrow navigation
Browse files Browse the repository at this point in the history
Closes #538
  • Loading branch information
trentdavida authored and ajoslin committed Nov 6, 2014
1 parent 0a40408 commit 367e47d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/radioButton/radioButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ function mdRadioGroupDirective($mdUtil, $mdConstant, $mdTheming) {
};

function keydownListener(ev) {
if (ev.which === $mdConstant.KEY_CODE.LEFT_ARROW) {
if (ev.which === $mdConstant.KEY_CODE.LEFT_ARROW || ev.which === $mdConstant.KEY_CODE.UP_ARROW) {
ev.preventDefault();
rgCtrl.selectPrevious();
}
else if (ev.which === $mdConstant.KEY_CODE.RIGHT_ARROW) {
else if (ev.which === $mdConstant.KEY_CODE.RIGHT_ARROW || ev.which === $mdConstant.KEY_CODE.DOWN_ARROW) {
ev.preventDefault();
rgCtrl.selectNext();
}
Expand Down

0 comments on commit 367e47d

Please sign in to comment.