commit: 86e1e6becf6afaf9bde9681ea0884ca37a54e3dc
parent 1ff3be579c49dce7f5a94c9d9ffe28cca0bf1b96
Author: HJ <30-hj@users.noreply.git.pleroma.social>
Date: Sat, 28 Dec 2024 14:51:22 +0000
Merge branch 'emoji-fixes' into 'develop'
Another fix attempt
See merge request pleroma/pleroma-fe!1961
Diffstat:
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/components/emoji_picker/emoji_picker.js b/src/components/emoji_picker/emoji_picker.js
@@ -140,14 +140,14 @@ const EmojiPicker = {
},
updateEmojiSize () {
const css = window.getComputedStyle(this.$refs.popover.$el)
- const fontSize = css.getPropertyValue('font-size')
- const emojiSize = css.getPropertyValue('--emojiSize')
+ const fontSize = css.getPropertyValue('font-size') || '14px'
+ const emojiSize = css.getPropertyValue('--emojiSize') || '2.2rem'
- const fontSizeUnit = fontSize.replace(/[0-9,.]+/, '') || 'px'
- const fontSizeValue = Number(fontSize.replace(/[^0-9,.]+/, '')) || 14
+ const fontSizeUnit = fontSize.replace(/[0-9,.]+/, '')
+ const fontSizeValue = Number(fontSize.replace(/[^0-9,.]+/, ''))
- const emojiSizeUnit = emojiSize.replace(/[0-9,.]+/, '') || 'rem'
- const emojiSizeValue = Number(emojiSize.replace(/[^0-9,.]+/, '')) || 2.2
+ const emojiSizeUnit = emojiSize.replace(/[0-9,.]+/, '')
+ const emojiSizeValue = Number(emojiSize.replace(/[^0-9,.]+/, ''))
let fontSizeMultiplier
if (fontSizeUnit.endsWith('em')) {