diff --git a/static/js/popovers.js b/static/js/popovers.js index 988767fe4f..f6b782d76e 100644 --- a/static/js/popovers.js +++ b/static/js/popovers.js @@ -1066,10 +1066,10 @@ exports.any_active = function () { $("[class^='column-'].expanded").length; }; -// This function will hide all true popovers (the userlist sidebar -// uses the popover infrastructure, but doesn't work like a popover -// structurally). -exports.hide_all_except_userlist_sidebar = function () { +// This function will hide all true popovers (the streamlist and +// userlist sidebars use the popover infrastructure, but doesn't work +// like a popover structurally). +exports.hide_all_except_sidebars = function () { $('.has_popover').removeClass('has_popover has_actions_popover has_emoji_popover'); popovers.hide_actions_popover(); popovers.hide_message_info_popover(); @@ -1080,7 +1080,6 @@ exports.hide_all_except_userlist_sidebar = function () { stream_popover.hide_starred_messages_popover(); popovers.hide_user_sidebar_popover(); popovers.hide_mobile_message_buttons_popover(); - stream_popover.restore_stream_list_size(); popovers.hide_user_profile(); // look through all the popovers that have been added and removed. @@ -1092,11 +1091,12 @@ exports.hide_all_except_userlist_sidebar = function () { list_of_popovers = []; }; -// This function will hide all the popovers, including the userlist -// sidebar. +// This function will hide all the popovers, including the mobile web +// or narrow window sidebars. exports.hide_all = function () { popovers.hide_userlist_sidebar(); - popovers.hide_all_except_userlist_sidebar(); + stream_popover.restore_stream_list_size(); + popovers.hide_all_except_sidebars(); }; exports.set_userlist_placement = function (placement) { diff --git a/static/js/topic_zoom.js b/static/js/topic_zoom.js index cd4842c8d1..c05bfdf8a0 100644 --- a/static/js/topic_zoom.js +++ b/static/js/topic_zoom.js @@ -11,7 +11,7 @@ exports.is_zoomed_in = function () { function zoom_in() { var stream_id = topic_list.active_stream_id(); - popovers.hide_all(); + popovers.hide_all_except_sidebars(); topic_list.zoom_in(); stream_list.zoom_in_topics({ stream_id: stream_id, @@ -23,7 +23,7 @@ function zoom_in() { exports.zoom_out = function () { var stream_li = topic_list.get_stream_li(); - popovers.hide_all(); + popovers.hide_all_except_sidebars(); topic_list.zoom_out(); stream_list.zoom_out_topics();