From f4da5526741f407e2a7c100c79e472980a376a99 Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Tue, 24 Nov 2020 23:40:02 +0100 Subject: [PATCH] Force the focus on the text field after adding an emoji Fix #71 --- imports/NeoChat/Component/ChatTextInput.qml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/imports/NeoChat/Component/ChatTextInput.qml b/imports/NeoChat/Component/ChatTextInput.qml index 3d0893f09..3a7fbe870 100644 --- a/imports/NeoChat/Component/ChatTextInput.qml +++ b/imports/NeoChat/Component/ChatTextInput.qml @@ -46,7 +46,10 @@ ToolBar { textArea: inputField emojiModel: EmojiModel { id: emojiModel } - onChoosen: textArea.insert(textArea.cursorPosition, emoji) + onChoosen: { + textArea.insert(textArea.cursorPosition, emoji); + textArea.forceActiveFocus(); + } } RowLayout {