mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-15 09:04:45 +00:00
fix: cursor position
This commit is contained in:
parent
9d9f51c080
commit
554128da50
@ -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, "<br />"));
|
||||
messageInputField.cursorPosition = messageInputField.length;
|
||||
messageInputField.cursorPosition = messageInputField.length - posBeforeEnd;
|
||||
|
||||
interrogateMessage();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user