message_controls: Don't auto-hide message control if a popover is open.

If a reactions picker is open then don't auto-hide the element over
which it is based off. Earlier we were inconsistently auto-hiding
some elements while keeping others visible.
This commit is contained in:
Harshit Bansal
2017-09-07 21:33:17 +05:30
committed by Tim Abbott
parent afba03f84e
commit dae51b821d
2 changed files with 10 additions and 0 deletions

View File

@@ -205,6 +205,7 @@ exports.hide_emoji_popover = function () {
$(".emoji-search-results-container").perfectScrollbar("destroy");
current_message_emoji_popover_elem.popover("destroy");
current_message_emoji_popover_elem.prop("title", orig_title);
current_message_emoji_popover_elem.removeClass("reaction_button_visible");
current_message_emoji_popover_elem = undefined;
}
};
@@ -576,6 +577,8 @@ exports.toggle_emoji_popover = function (element, id) {
}
if (elt.data('popover') === undefined) {
// Keep the element over which the popover is based off visible.
elt.addClass("reaction_button_visible");
emoji_picker.render_emoji_popover(elt, id);
}
};

View File

@@ -75,6 +75,13 @@
color: hsl(0, 0%, 73%);
}
.reaction_button_visible {
visibility: visible !important;
pointer-events: all !important;
opacity: 1 !important;
color: hsl(0, 0%, 73%);
}
.message_reactions .reaction_button i {
font-size: 1em;
margin-right: 3px;