Allow using mouse wheel to navigate through the emoji tabs (#179) #222

Merged
floatingghost merged 1 commit from Mergan/pleroma-fe:emoji-picker-allow-scroll into develop 2022-11-21 16:51:30 +00:00
2 changed files with 9 additions and 1 deletions

View file

@ -62,6 +62,10 @@ const EmojiPicker = {
this.scrolledGroup(target)
this.triggerLoadMore(target)
},
onWheel (e) {
e.preventDefault()
this.$refs['emoji-tabs'].scrollBy(e.deltaY, 0)
},
highlight (key) {
this.setShowStickers(false)
this.activeGroup = key

View file

@ -1,7 +1,11 @@
<template>
<div class="emoji-picker panel panel-default panel-body">
<div class="heading">
<span class="emoji-tabs">
<span
class="emoji-tabs"
@wheel="onWheel"
ref="emoji-tabs"
>
<span
v-for="group in emojis"
:key="group.id"