diff --git a/ui/shared/status/StatusChatInput.qml b/ui/shared/status/StatusChatInput.qml index c929904bbb..690d6aee7f 100644 --- a/ui/shared/status/StatusChatInput.qml +++ b/ui/shared/status/StatusChatInput.qml @@ -194,10 +194,11 @@ Rectangle { // we can only get it in the `released` event if (paste) { paste = false; + const posBeforeEnd = messageInputField.length - messageInputField.cursorPosition; const deparsedEmoji = Emoji.deparse(messageInputField.text); const plainText = chatsModel.plainText(deparsedEmoji); messageInputField.text = Emoji.parse(plainText.replace(/\n/g, "
")); - messageInputField.cursorPosition = messageInputField.length; + messageInputField.cursorPosition = messageInputField.length - posBeforeEnd; interrogateMessage(); }