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.
This commit is contained in:
Karim Malhas 2023-04-22 13:20:24 +02:00 committed by fiaxh
parent f011adac37
commit a74b894147

View file

@ -39,6 +39,8 @@ public class View : Box {
chooser.emoji_picked.connect((emoji) => { chooser.emoji_picked.connect((emoji) => {
chat_text_view.text_view.buffer.insert_at_cursor(emoji, emoji.data.length); chat_text_view.text_view.buffer.insert_at_cursor(emoji, emoji.data.length);
}); });
chooser.closed.connect(do_focus);
emoji_button.set_popover(chooser); emoji_button.set_popover(chooser);
file_button.tooltip_text = Util.string_if_tooltips_active(_("Send a file")); file_button.tooltip_text = Util.string_if_tooltips_active(_("Send a file"));