Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

left-sidebar: Only add expanded class to it if it is a popover.

Aman Agrawalde4aeacbb1a9
diff --git a/frontend_tests/node_tests/stream_search.js b/frontend_tests/node_tests/stream_search.js
index 3451ff55ebf..bd2b3d82331 100644
--- a/frontend_tests/node_tests/stream_search.js
+++ b/frontend_tests/node_tests/stream_search.js
@@ -183,6 +183,7 @@ run_test("expanding_sidebar", () => {
stream_popover.show_streamlist_sidebar = () => {
events.push("stream_popover.show_streamlist_sidebar");
};
+ $("#streamlist-toggle").show();
stream_list.initiate_search();
diff --git a/static/js/stream_list.js b/static/js/stream_list.js
index 72e8658e434..fb126c47338 100644
--- a/static/js/stream_list.js
+++ b/static/js/stream_list.js
@@ -597,7 +597,11 @@ exports.initiate_search = function () {
const filter = $(".stream-list-filter").expectOne();
- if (!$(".app-main .column-left").hasClass("expanded")) {
+ if (
+ // Check if left column is a popover and is not visible.
+ $("#streamlist-toggle").is(":visible") &&
+ !$(".app-main .column-left").hasClass("expanded")
+ ) {
popovers.hide_all();
stream_popover.show_streamlist_sidebar();
}