mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 21:13:36 +00:00
Add support for emoji picker hotkeys in compose context.
This is a follow-up to merging the compose and reactions emoji pickers. The logic for what happens when the user picks an emoji via the hotkeys (i.e. hits `enter`) was still attempting to add a reaction to the currently selected message unconditionally. This commit adds a check in the two `enter` key code paths, and does the correct thing in each case. Fixes #4736.
This commit is contained in:
committed by
Tim Abbott
parent
52059d21a4
commit
5dd5c84854
@@ -116,7 +116,11 @@ function maybe_select_emoji(e) {
|
||||
e.preventDefault();
|
||||
var first_emoji = get_emoji_at_index(0);
|
||||
if (first_emoji) {
|
||||
exports.toggle_reaction(current_msg_list.selected_id(), first_emoji.title);
|
||||
if (emoji_picker.is_composition(first_emoji)) {
|
||||
first_emoji.click();
|
||||
} else {
|
||||
exports.toggle_reaction(current_msg_list.selected_id(), first_emoji.title);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user