Skip to content

Commit

Permalink
make selectable by tab
Browse files Browse the repository at this point in the history
Signed-off-by: Vanessa Pertsch <vanessa.pertsch@nextcloud.com>
  • Loading branch information
vanpertsch committed Mar 23, 2022
1 parent 66bf198 commit 048c2d4
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions src/components/EmojiPicker/EmojiPicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,12 @@
popover-inner-class="popover-emoji-picker-inner"
v-bind="$attrs"
v-on="$listeners">
@after-show="afterShow">
<template #trigger>
<slot />
</template>
<Picker
ref="picker"
:auto-focus="true"
color="var(--color-primary)"
:data="emojiIndex"
Expand Down Expand Up @@ -216,6 +218,15 @@ export default {
this.open = false
}
},
afterShow() {
const picker = this.$refs.picker
const input = picker.$refs.search.$el.querySelector('input')
if (input) {
input.focus()
}
},
},
}
</script>
Expand Down Expand Up @@ -253,9 +264,16 @@ export default {
font-size: inherit;
height: 36px;
width: auto;
* {
cursor: pointer !important;
}
&:focus {
background-color: #f4f4f4;
border: 2px solid var(--color-primary) !important;
border-radius: 50%;
}
}
.emoji-mart-bar,
Expand Down Expand Up @@ -309,8 +327,9 @@ export default {
flex-basis: calc(100% / 8);
text-align: center;
&:hover::before {
background-color: var(--color-background-hover);
&:hover::before,
&.emoji-mart-emoji-selected::before{
outline: 2px solid var(--color-primary);
}
}
}
Expand Down

0 comments on commit 048c2d4

Please sign in to comment.