Improve emoji insertion UX
This commit is contained in:
parent
126ee2ac35
commit
258dd35754
|
|
@ -217,12 +217,7 @@ public sealed partial class NanoChatUiFragment : BoxContainer
|
|||
|
||||
private void InsertEmoji(string emoji)
|
||||
{
|
||||
var currentText = MessageInput.Text;
|
||||
var cursorPos = MessageInput.CursorPosition;
|
||||
|
||||
var newText = currentText.Insert(cursorPos, emoji);
|
||||
MessageInput.Text = newText;
|
||||
MessageInput.CursorPosition = cursorPos + emoji.Length;
|
||||
MessageInput.InsertAtCursor(emoji);
|
||||
MessageInput.GrabKeyboardFocus();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue