diff --git a/static/js/emoji_picker.js b/static/js/emoji_picker.js index 3bd054bfc7..9c95b410e9 100644 --- a/static/js/emoji_picker.js +++ b/static/js/emoji_picker.js @@ -693,6 +693,26 @@ exports.register_click_handlers = function () { emoji_picker.toggle_emoji_popover(this, message_id); }); + $("#main_div").on("mouseenter", ".reaction_button", function (e) { + e.stopPropagation(); + + var elem = $(this); + var title = i18n.t("Add emoji reaction"); + elem.tooltip({ + title: title + " (:)", + trigger: 'hover', + placement: 'bottom', + animation: false, + }); + elem.tooltip('show'); + $(".tooltip-arrow").remove(); + }); + + $('#main_div').on('mouseleave', '.reaction_button', function (e) { + e.stopPropagation(); + $(this).tooltip('hide'); + }); + $("body").on("click", ".actions_popover .reaction_button", function (e) { var msgid = $(e.currentTarget).data('message-id'); e.preventDefault(); diff --git a/static/templates/message_reactions.hbs b/static/templates/message_reactions.hbs index d9e6d33a46..995516fd80 100644 --- a/static/templates/message_reactions.hbs +++ b/static/templates/message_reactions.hbs @@ -1,7 +1,7 @@ {{#each this/msg/message_reactions}} {{> message_reaction}} {{/each}} -