Fixed space key for row radio and checkbox
parent
38b1f81c1c
commit
658612f40f
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="p-checkbox p-component" @click="onClick" @keydown.space.prevent="onClick">
|
<div class="p-checkbox p-component" @click="onClick">
|
||||||
<div ref="box" :class="['p-checkbox-box p-component', {'p-highlight': checked, 'p-disabled': $attrs.disabled, 'p-focus': focused}]"
|
<div ref="box" :class="['p-checkbox-box p-component', {'p-highlight': checked, 'p-disabled': $attrs.disabled, 'p-focus': focused}]"
|
||||||
role="checkbox" :aria-checked="checked" :tabindex="$attrs.disabled ? null : '0'" @focus="onFocus($event)" @blur="onBlur($event)">
|
role="checkbox" :aria-checked="checked" :tabindex="$attrs.disabled ? null : '0'" @keydown.space.prevent="onClick" @focus="onFocus($event)" @blur="onBlur($event)">
|
||||||
<span :class="['p-checkbox-icon', {'pi pi-check': checked}]"></span>
|
<span :class="['p-checkbox-icon', {'pi pi-check': checked}]"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="p-radiobutton p-component" @click="onClick" tabindex="0" @focus="onFocus($event)" @blur="onBlur($event)">
|
<div class="p-radiobutton p-component" @click="onClick" tabindex="0" @focus="onFocus($event)" @blur="onBlur($event)" @keydown.space.prevent="onClick">
|
||||||
<div ref="box" :class="['p-radiobutton-box p-component', {'p-highlight': checked, 'p-disabled': $attrs.disabled, 'p-focus': focused}]" role="radio" :aria-checked="checked">
|
<div ref="box" :class="['p-radiobutton-box p-component', {'p-highlight': checked, 'p-disabled': $attrs.disabled, 'p-focus': focused}]" role="radio" :aria-checked="checked">
|
||||||
<div class="p-radiobutton-icon"></div>
|
<div class="p-radiobutton-icon"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue