1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Emoji working for compose

This commit is contained in:
xmflsct
2022-09-19 22:22:52 +02:00
parent b44370d3ec
commit fb3cfa0db1
4 changed files with 16 additions and 188 deletions

View File

@ -42,7 +42,7 @@ const EmojisList = () => {
} = emojisState.inputProps[emojisState.targetIndex]
const contentFront = value.slice(0, selection.start)
const contentRear = value.slice(selection.end)
const contentRear = value.slice(selection.end || selection.start)
const spaceFront = value.length === 0 || /\s/g.test(contentFront.slice(-1)) ? '' : ' '
const spaceRear = /\s/g.test(contentRear[0]) ? '' : ' '