mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
ui_init: Hide sidebar when clicking a topic link on small devices.
Previously, clicking a topic link on small devices did not close the left sidebar, and it had to be manually closed. This commit fixes that by calling `sidebar_ui.hide_streamlist_sidebar()` when a topic link is clicked and the left sidebar is displayed as an overlay.
This commit is contained in:
@@ -686,6 +686,15 @@ export function initialize_everything(state_data) {
|
||||
}
|
||||
|
||||
message_view.show(narrow, {trigger: "sidebar"});
|
||||
|
||||
if (sidebar_ui.left_sidebar_expanded_as_overlay) {
|
||||
// If the left sidebar is drawn over the center pane,
|
||||
// hide it so that the user can actually see the
|
||||
// topic. We don't need to also hide the user list
|
||||
// sidebar, since its own click-outside handler will
|
||||
// hide it.
|
||||
sidebar_ui.hide_streamlist_sidebar();
|
||||
}
|
||||
},
|
||||
});
|
||||
drafts.initialize_ui();
|
||||
|
Reference in New Issue
Block a user