Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
stream_list: Scroll selected topic into view when zoomed in.
Aman Agrawal3d6baaf450c0
diff --git a/web/src/stream_list.ts b/web/src/stream_list.tsindex acadac9755d..32ce5ed3492 100644--- a/web/src/stream_list.ts+++ b/web/src/stream_list.ts@@ -780,6 +780,10 @@ export function handle_narrow_activated(}}}++ if (is_zoomed_in()) {+ topic_list.scroll_zoomed_in_topic_into_view();+ }}export function handle_message_view_deactivated(): void {diff --git a/web/src/topic_list.ts b/web/src/topic_list.tsindex 9ecae145ab6..ed38a8c7c8b 100644--- a/web/src/topic_list.ts+++ b/web/src/topic_list.ts@@ -282,7 +282,7 @@ export function rebuild($stream_li: JQuery, stream_id: number): void {active_widgets.set(stream_id, widget);}-function scroll_zoomed_in_topic_into_view(): void {+export function scroll_zoomed_in_topic_into_view(): void {const $selected_topic = $(".topic-list .topic-list-item.active-sub-filter");if ($selected_topic.length === 0) {// If we don't have a selected topic, scroll to top.