Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

emoji_picker: Fix inconsistency in edge case.

Gittenburg42f20e81bedb
diff --git a/static/js/click_handlers.js b/static/js/click_handlers.js
index 4595fc85660..a91a93bcbdc 100644
--- a/static/js/click_handlers.js
+++ b/static/js/click_handlers.js
@@ -170,8 +170,7 @@ exports.initialize = function () {
message_flags.toggle_starred_and_update_server(message);
});
- $("#main_div").on("click", ".message_reaction", function (e) {
- e.stopPropagation();
+ $("#main_div").on("click", ".message_reaction", function () {
const local_id = $(this).attr('data-reaction-id');
const message_id = rows.get_message_id(this);
reactions.process_reaction_click(message_id, local_id);
diff --git a/static/js/emoji_picker.js b/static/js/emoji_picker.js
index a54d53a34e7..5fbb1c5fa96 100644
--- a/static/js/emoji_picker.js
+++ b/static/js/emoji_picker.js
@@ -244,6 +244,7 @@ function toggle_reaction(emoji_name) {
}
reactions.toggle_emoji_reaction(message_id, emoji_name);
+ exports.hide_emoji_popover();
}
function maybe_select_emoji(e) {
diff --git a/static/js/reactions.js b/static/js/reactions.js
index b072e0ebf03..6d8f2a1d3ca 100644
--- a/static/js/reactions.js
+++ b/static/js/reactions.js
@@ -113,10 +113,6 @@ exports.toggle_emoji_reaction = function (message_id, emoji_name) {
}
update_ui_and_send_reaction_ajax(message_id, reaction_info);
-
- // The next line isn't always necessary, but it is harmless/quick
- // when no popovers are there.
- emoji_picker.hide_emoji_popover();
};
exports.process_reaction_click = function (message_id, local_id) {