Commit 17094133c1796a1f4521ea4f3f622cd96a9466d5
Committed by
GitHub
Merge pull request #1 from SergioCrisostomo/chackbox_tabindex2
Focus on <label> when <input> gets the focus
Showing
1 changed file
with
8 additions
and
4 deletions
Show diff stats
src/components/checkbox/checkbox.vue
... | ... | @@ -8,22 +8,26 @@ |
8 | 8 | <input |
9 | 9 | v-if="group" |
10 | 10 | type="checkbox" |
11 | - tabindex="-1" | |
11 | + tabindex="-1" | |
12 | 12 | :class="inputClasses" |
13 | 13 | :disabled="disabled" |
14 | 14 | :value="label" |
15 | 15 | v-model="model" |
16 | 16 | :name="name" |
17 | - @change="change"> | |
17 | + @change="change" | |
18 | + @focus="$el.focus()" | |
19 | + > | |
18 | 20 | <input |
19 | 21 | v-if="!group" |
20 | 22 | type="checkbox" |
21 | - tabindex="-1" | |
23 | + tabindex="-1" | |
22 | 24 | :class="inputClasses" |
23 | 25 | :disabled="disabled" |
24 | 26 | :checked="currentValue" |
25 | 27 | :name="name" |
26 | - @change="change"> | |
28 | + @change="change" | |
29 | + @focus="$el.focus()" | |
30 | + > | |
27 | 31 | </span> |
28 | 32 | <slot><span v-if="showSlot">{{ label }}</span></slot> |
29 | 33 | </label> | ... | ... |