Skip to content

Commit

Permalink
Radio: support switching radio with keyborard in ff. Fixes #8198
Browse files Browse the repository at this point in the history
  • Loading branch information
jikkai committed May 24, 2018
1 parent ec9d242 commit 22461fe
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/radio/src/radio-group.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,10 @@
e.preventDefault();
if (index === 0) {
roleRadios[length - 1].click();
roleRadios[length - 1].focus();
} else {
roleRadios[index - 1].click();
roleRadios[index - 1].focus();
}
break;
case keyCode.RIGHT:
Expand All @@ -84,8 +86,10 @@
e.stopPropagation();
e.preventDefault();
roleRadios[0].click();
roleRadios[0].focus();
} else {
roleRadios[index + 1].click();
roleRadios[index + 1].focus();
}
break;
default:
Expand Down

0 comments on commit 22461fe

Please sign in to comment.