aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/chat_input
diff options
context:
space:
mode:
authorKarim Malhas <karim@malhas.de>2023-04-22 13:20:24 +0200
committerfiaxh <fiaxh@users.noreply.github.com>2023-04-23 11:53:57 +0200
commitec6c24c2b41fc9de704323ce895b2dc81549ca5e (patch)
treed17caeda8ae1826cf506a8b606e057265758eea2 /main/src/ui/chat_input
parent10315a245d7ed23ac9c915ecb298a484050ccef1 (diff)
downloaddino-ec6c24c2b41fc9de704323ce895b2dc81549ca5e.tar.gz
dino-ec6c24c2b41fc9de704323ce895b2dc81549ca5e.zip
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.
Diffstat (limited to 'main/src/ui/chat_input')
-rw-r--r--main/src/ui/chat_input/view.vala2
1 files changed, 2 insertions, 0 deletions
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"));