Skip to content

Commit

Permalink
fixup! fix(NcEmojiPicker): skip emoji on Tab navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
ShGKme committed Jan 29, 2025
1 parent fa3ceec commit a2985b7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/components/NcEmojiPicker/NcEmojiPicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,12 @@ This component allows the user to pick an emoji.
</docs>

<template>
<NcPopover :shown.sync="open"
<NcPopover ref="popover"
:shown.sync="open"
:container="container"
popup-role="dialog"
v-bind="$attrs"
:focus-trap="false /* Handled manually */"
:focus-trap="false /* Handled manually to remove emoji buttons from TAB sequence */"
v-on="$listeners"
@after-show="afterShow"
@after-hide="afterHide">
Expand Down Expand Up @@ -399,6 +400,8 @@ export default {
},

afterHide() {
// Manually return focus to the trigger button, as we disabled focus-trap
this.$refs.popover.$el.querySelector('button, [role="button"]')?.focus()
},

/**
Expand Down

0 comments on commit a2985b7

Please sign in to comment.