Skip to content

Commit 21a6aa3

Browse files
jikkaiziyoung
authored andcommitted
Radio: stop event propagation on radio label (#11912)
1 parent 1e6e32b commit 21a6aa3

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

packages/radio/src/radio-button.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@
2525
@focus="focus = true"
2626
@blur="focus = false"
2727
>
28-
<span class="el-radio-button__inner" :style="value === label ? activeStyle : null">
28+
<span
29+
class="el-radio-button__inner"
30+
:style="value === label ? activeStyle : null"
31+
@keydown.stop>
2932
<slot></slot>
3033
<template v-if="!$slots.default">{{label}}</template>
3134
</span>

packages/radio/src/radio.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
tabindex="-1"
3636
>
3737
</span>
38-
<span class="el-radio__label">
38+
<span class="el-radio__label" @keydown.stop>
3939
<slot></slot>
4040
<template v-if="!$slots.default">{{label}}</template>
4141
</span>

0 commit comments

Comments
 (0)