Skip to content
Snippets Groups Projects
Commit 54c4ee41 authored by Gabriel Engel's avatar Gabriel Engel
Browse files

Merge pull request #1897 from RocketChat/fix-flex-cog-dropdown

Fixes a bug with search results, where sometimes cog wasn't displayed.
parents e393d7f6 6092fc51
No related branches found
No related tags found
No related merge requests found
...@@ -53,13 +53,12 @@ Template.messageSearch.events ...@@ -53,13 +53,12 @@ Template.messageSearch.events
message_id = $(e.currentTarget).closest('.message').attr('id') message_id = $(e.currentTarget).closest('.message').attr('id')
$('.message-dropdown:visible').hide() $('.message-dropdown:visible').hide()
$(".search-messages-list \##{message_id} .message-dropdown").remove() $(".search-messages-list \##{message_id} .message-dropdown").remove()
message = Blaze.getData($("\.search-messages-list ##{message_id}")?[0])?._arguments?[1] message = _.findWhere(t.searchResult.get()?.messages, (message) -> return message._id is message_id)
if message actions = RocketChat.MessageAction.getButtons message
actions = RocketChat.MessageAction.getButtons message el = Blaze.toHTMLWithData Template.messageDropdown, { actions: actions }
el = Blaze.toHTMLWithData Template.messageDropdown, { actions: actions } $(".search-messages-list \##{message_id} .message-cog-container").append el
$(".search-messages-list \##{message_id} .message-cog-container").append el dropDown = $(".search-messages-list \##{message_id} .message-dropdown")
dropDown = $(".search-messages-list \##{message_id} .message-dropdown") dropDown.show()
dropDown.show()
'scroll .content': _.throttle (e, t) -> 'scroll .content': _.throttle (e, t) ->
if e.target.scrollTop >= e.target.scrollHeight - e.target.clientHeight if e.target.scrollTop >= e.target.scrollHeight - e.target.clientHeight
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment