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.

topic_list: Fix top selected element not visible on system scroll.

Aman Agrawala5e2a7b4e406
diff --git a/web/src/topic_list.ts b/web/src/topic_list.ts
index fd58ef5ec12..9ecae145ab6 100644
--- a/web/src/topic_list.ts
+++ b/web/src/topic_list.ts
@@ -290,7 +290,11 @@ function scroll_zoomed_in_topic_into_view(): void {
return;
}
const $container = $("#left_sidebar_scroll_container");
- scroll_util.scroll_element_into_container($selected_topic, $container);
+ const stream_header_height =
+ $(".narrow-filter.stream-expanded .bottom_left_row").outerHeight(true) ?? 0;
+ const topic_header_height = $("#topics_header").outerHeight(true) ?? 0;
+ const sticky_header_height = stream_header_height + topic_header_height;
+ scroll_util.scroll_element_into_container($selected_topic, $container, sticky_header_height);
}
// For zooming, we only do topic-list stuff here...let stream_list