From a74b894147381e757d5230cbc765e9e918210f85 Mon Sep 17 00:00:00 2001 From: Karim Malhas Date: Sat, 22 Apr 2023 13:20:24 +0200 Subject: [PATCH] Focus ChatInput textbox after selecting emoji After selecting an emoji, the emoji is inserted into the textbox, but focus remains on the emoji_button. This causes the EmojiChooser to be opened again if a user hits the Enter key directly, but text is inserted into the textbox if they continue to type. This commit just explicitely focuses on the textbox after an emoji has been selected. --- main/src/ui/chat_input/view.vala | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main/src/ui/chat_input/view.vala b/main/src/ui/chat_input/view.vala index e16b4085..96986b58 100644 --- a/main/src/ui/chat_input/view.vala +++ b/main/src/ui/chat_input/view.vala @@ -39,6 +39,8 @@ public class View : Box { chooser.emoji_picked.connect((emoji) => { chat_text_view.text_view.buffer.insert_at_cursor(emoji, emoji.data.length); }); + chooser.closed.connect(do_focus); + emoji_button.set_popover(chooser); file_button.tooltip_text = Util.string_if_tooltips_active(_("Send a file"));