Skip to content

Commit

Permalink
fix(*): fix keyboard events (#2033)
Browse files Browse the repository at this point in the history
  • Loading branch information
portikM authored Feb 23, 2024
1 parent c11064c commit ae5f816
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
5 changes: 2 additions & 3 deletions src/components/KModal/KModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,8 @@
tabindex="0"
title="Close"
@click="$emit('cancel')"
@keydown.space.prevent
@keyup.enter="$emit('cancel')"
@keyup.space="$emit('cancel')"
@keydown.enter="$emit('cancel')"
@keydown.space.prevent="$emit('cancel')"
/>
</div>
<div
Expand Down
5 changes: 2 additions & 3 deletions src/components/KSlideout/KSlideout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@
tabindex="0"
title="Close"
@click="$emit('close')"
@keydown.space.prevent
@keyup.enter="$emit('close')"
@keyup.space="$emit('close')"
@keydown.enter="$emit('close')"
@keydown.space.prevent="$emit('close')"
/>
</div>
<div class="slideout-content">
Expand Down
2 changes: 2 additions & 0 deletions src/components/KToaster/KToaster.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
:size="KUI_ICON_SIZE_50"
tabindex="0"
@click="$emit('close', toaster.key)"
@keydown.enter="$emit('close', toaster.key)"
@keydown.space.prevent="$emit('close', toaster.key)"
/>
</div>
</TransitionGroup>
Expand Down
5 changes: 2 additions & 3 deletions src/components/KTruncate/KTruncate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,8 @@
role="button"
tabindex="0"
@click.stop="handleToggleClick"
@keydown.space.prevent
@keyup.enter="handleToggleClick"
@keyup.space="handleToggleClick"
@keydown.enter="handleToggleClick"
@keydown.space.prevent="handleToggleClick"
/>
</slot>
</div>
Expand Down

0 comments on commit ae5f816

Please sign in to comment.