Skip to content

Commit 22461fe

Browse files
committed
Radio: support switching radio with keyborard in ff. Fixes #8198
1 parent ec9d242 commit 22461fe

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/radio/src/radio-group.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,10 @@
7474
e.preventDefault();
7575
if (index === 0) {
7676
roleRadios[length - 1].click();
77+
roleRadios[length - 1].focus();
7778
} else {
7879
roleRadios[index - 1].click();
80+
roleRadios[index - 1].focus();
7981
}
8082
break;
8183
case keyCode.RIGHT:
@@ -84,8 +86,10 @@
8486
e.stopPropagation();
8587
e.preventDefault();
8688
roleRadios[0].click();
89+
roleRadios[0].focus();
8790
} else {
8891
roleRadios[index + 1].click();
92+
roleRadios[index + 1].focus();
8993
}
9094
break;
9195
default:

0 commit comments

Comments
 (0)