mirror of https://github.com/zulip/zulip.git
popovers: Fix closing of the left sidebar with "more topics".
This was another case of incorrect logic due to treating the sidebars as popovers for the purposes of .hide_all(). Fixes #12274.
This commit is contained in:
parent
5e6d86c8c4
commit
01bc4674e3
|
@ -1066,10 +1066,10 @@ exports.any_active = function () {
|
||||||
$("[class^='column-'].expanded").length;
|
$("[class^='column-'].expanded").length;
|
||||||
};
|
};
|
||||||
|
|
||||||
// This function will hide all true popovers (the userlist sidebar
|
// This function will hide all true popovers (the streamlist and
|
||||||
// uses the popover infrastructure, but doesn't work like a popover
|
// userlist sidebars use the popover infrastructure, but doesn't work
|
||||||
// structurally).
|
// like a popover structurally).
|
||||||
exports.hide_all_except_userlist_sidebar = function () {
|
exports.hide_all_except_sidebars = function () {
|
||||||
$('.has_popover').removeClass('has_popover has_actions_popover has_emoji_popover');
|
$('.has_popover').removeClass('has_popover has_actions_popover has_emoji_popover');
|
||||||
popovers.hide_actions_popover();
|
popovers.hide_actions_popover();
|
||||||
popovers.hide_message_info_popover();
|
popovers.hide_message_info_popover();
|
||||||
|
@ -1080,7 +1080,6 @@ exports.hide_all_except_userlist_sidebar = function () {
|
||||||
stream_popover.hide_starred_messages_popover();
|
stream_popover.hide_starred_messages_popover();
|
||||||
popovers.hide_user_sidebar_popover();
|
popovers.hide_user_sidebar_popover();
|
||||||
popovers.hide_mobile_message_buttons_popover();
|
popovers.hide_mobile_message_buttons_popover();
|
||||||
stream_popover.restore_stream_list_size();
|
|
||||||
popovers.hide_user_profile();
|
popovers.hide_user_profile();
|
||||||
|
|
||||||
// look through all the popovers that have been added and removed.
|
// 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 = [];
|
list_of_popovers = [];
|
||||||
};
|
};
|
||||||
|
|
||||||
// This function will hide all the popovers, including the userlist
|
// This function will hide all the popovers, including the mobile web
|
||||||
// sidebar.
|
// or narrow window sidebars.
|
||||||
exports.hide_all = function () {
|
exports.hide_all = function () {
|
||||||
popovers.hide_userlist_sidebar();
|
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) {
|
exports.set_userlist_placement = function (placement) {
|
||||||
|
|
|
@ -11,7 +11,7 @@ exports.is_zoomed_in = function () {
|
||||||
function zoom_in() {
|
function zoom_in() {
|
||||||
var stream_id = topic_list.active_stream_id();
|
var stream_id = topic_list.active_stream_id();
|
||||||
|
|
||||||
popovers.hide_all();
|
popovers.hide_all_except_sidebars();
|
||||||
topic_list.zoom_in();
|
topic_list.zoom_in();
|
||||||
stream_list.zoom_in_topics({
|
stream_list.zoom_in_topics({
|
||||||
stream_id: stream_id,
|
stream_id: stream_id,
|
||||||
|
@ -23,7 +23,7 @@ function zoom_in() {
|
||||||
exports.zoom_out = function () {
|
exports.zoom_out = function () {
|
||||||
var stream_li = topic_list.get_stream_li();
|
var stream_li = topic_list.get_stream_li();
|
||||||
|
|
||||||
popovers.hide_all();
|
popovers.hide_all_except_sidebars();
|
||||||
topic_list.zoom_out();
|
topic_list.zoom_out();
|
||||||
stream_list.zoom_out_topics();
|
stream_list.zoom_out_topics();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue