commit: 5dc6cbd487ff5e1f8a709e1886dd1a850cae9ce8
parent 06068afe9135bb25fb5f6426b6d6d3c5b9ccc815
Author: HJ <30-hj@users.noreply.git.pleroma.social>
Date: Mon, 9 Jan 2023 21:11:39 +0000
Merge branch 'tusooa/1234-emoji-regression' into 'develop'
Fix emoji picker off-by-1 error
Closes #1234
See merge request pleroma/pleroma-fe!1747
Diffstat:
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/components/emoji_picker/emoji_picker.js b/src/components/emoji_picker/emoji_picker.js
@@ -244,7 +244,7 @@ const EmojiPicker = {
if (!this.$refs['emoji-groups']) {
return
}
- this.width = this.$refs['emoji-groups'].$el.offsetWidth
+ this.width = this.$refs['emoji-groups'].$el.clientWidth
})
}
},
diff --git a/src/components/emoji_picker/emoji_picker.scss b/src/components/emoji_picker/emoji_picker.scss
@@ -7,7 +7,7 @@ $emoji-picker-emoji-size: 32px;
.emoji-picker {
width: 25em;
- max-width: 100vw;
+ max-width: calc(100vw - 20px); // popover gives 10px margin from window edge
display: flex;
flex-direction: column;
background-color: $fallback--bg;
diff --git a/src/components/emoji_picker/emoji_picker.vue b/src/components/emoji_picker/emoji_picker.vue
@@ -83,6 +83,7 @@
:emit-update="true"
@update="onScroll"
@visible="recalculateItemPerRow"
+ @resize="recalculateItemPerRow"
>
<template #default="{ item: group, index, active }">
<DynamicScrollerItem