diff --git a/app/views/notes/_comment.html.erb b/app/views/notes/_comment.html.erb index 702e8fee5c..9cd2876938 100644 --- a/app/views/notes/_comment.html.erb +++ b/app/views/notes/_comment.html.erb @@ -95,7 +95,7 @@ <% emoji_names.each do |e| %> <% capitalized_emoji_name = e.split("-").map(&:capitalize).join %> <% str = "/comment/like?comment_id=#{comment.cid}&user_id=#{current_user.uid}&emoji_type=#{capitalized_emoji_name}" %> - <%= link_to str, data: { method: "post", remote: true }, style: "margin: 6px;" do %> + <%= link_to str, data: { method: "post", remote: true }, style: "margin: 6px;", class: "emoji-btn" do %> <% end %> <% end %> @@ -132,6 +132,13 @@ } }); }); + + $('.emoji-btn').click(function() { + setTimeout(() => { + $('#emoji-dropdown').removeClass('show'); + $('#dropdownMenuButton').attr('aria-expanded', 'false'); + }, 5000); + });