Merge pull request #1 from SergioCrisostomo/chackbox_tabindex2

Focus on <label> when <input> gets the focus
This commit is contained in:
Graham Fairweather 2018-01-19 07:02:51 +01:00 committed by GitHub
commit 17094133c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,7 +14,9 @@
:value="label" :value="label"
v-model="model" v-model="model"
:name="name" :name="name"
@change="change"> @change="change"
@focus="$el.focus()"
>
<input <input
v-if="!group" v-if="!group"
type="checkbox" type="checkbox"
@ -23,7 +25,9 @@
:disabled="disabled" :disabled="disabled"
:checked="currentValue" :checked="currentValue"
:name="name" :name="name"
@change="change"> @change="change"
@focus="$el.focus()"
>
</span> </span>
<slot><span v-if="showSlot">{{ label }}</span></slot> <slot><span v-if="showSlot">{{ label }}</span></slot>
</label> </label>