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 17, 2022
1 parent 3ab580b commit 1620e07
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions src/components/EmojiPicker/EmojiPicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,13 @@
:open.sync="open"
:container="container"
popover-class="emoji-popover"
popover-inner-class="popover-emoji-picker-inner">
popover-inner-class="popover-emoji-picker-inner"
@after-show="afterShow">
<template #trigger>
<slot />
</template>
<Picker
ref="picker"
:auto-focus="true"
color="var(--color-primary)"
:data="emojiIndex"
Expand Down Expand Up @@ -214,6 +216,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 @@ -251,9 +262,14 @@ export default {
font-size: inherit;
height: 36px;
width: auto;
* {
cursor: pointer !important;
}
&:focus {
outline: 1px solid var(--color-primary) !important;
}
}
.emoji-mart-bar,
Expand Down Expand Up @@ -307,8 +323,9 @@ export default {
flex-basis: calc(100% / 8);
text-align: center;
&:hover::before {
background-color: var(--color-background-hover);
&:hover,
&.emoji-mart-emoji-selected{
border: 1px solid var(--color-primary);
}
}
}
Expand Down

0 comments on commit 1620e07

Please sign in to comment.