popovers: Remove unnecessary removal of popover classes.

has_popover is not used anywhere.
has_emoji_popover is not used anywhere.
has_actions_popover is handled by actions popover itself.
This commit is contained in:
Aman Agrawal 2023-09-26 12:35:45 +00:00 committed by Tim Abbott
parent ddb0d8d298
commit 08d1290912
2 changed files with 2 additions and 3 deletions

View File

@ -868,7 +868,7 @@ export function initialize() {
message_lists.current.select_id(message_id); message_lists.current.select_id(message_id);
const args = popover_menus_data.get_actions_popover_content_context(message_id); const args = popover_menus_data.get_actions_popover_content_context(message_id);
instance.setContent(parse_html(render_actions_popover_content(args))); instance.setContent(parse_html(render_actions_popover_content(args)));
$row.addClass("has_popover has_actions_popover"); $row.addClass("has_actions_popover");
}, },
onMount(instance) { onMount(instance) {
if (message_actions_popover_keyboard_toggle) { if (message_actions_popover_keyboard_toggle) {
@ -994,7 +994,7 @@ export function initialize() {
}, },
onHidden(instance) { onHidden(instance) {
const $row = $(instance.reference).closest(".message_row"); const $row = $(instance.reference).closest(".message_row");
$row.removeClass("has_popover has_actions_popover"); $row.removeClass("has_actions_popover");
instance.destroy(); instance.destroy();
popover_instances.message_actions = undefined; popover_instances.message_actions = undefined;
message_actions_popover_keyboard_toggle = false; message_actions_popover_keyboard_toggle = false;

View File

@ -29,7 +29,6 @@ export function any_active() {
// userlist sidebars use the popover infrastructure, but doesn't work // userlist sidebars use the popover infrastructure, but doesn't work
// like a popover structurally). // like a popover structurally).
export function hide_all_except_sidebars(opts) { export function hide_all_except_sidebars(opts) {
$(".has_popover").removeClass("has_popover has_actions_popover has_emoji_popover");
if (!opts || !opts.not_hide_tippy_instances) { if (!opts || !opts.not_hide_tippy_instances) {
// hideAll hides all tippy instances (tooltips and popovers). // hideAll hides all tippy instances (tooltips and popovers).
hideAll(); hideAll();