Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
resize: Compute max height of subscribers list only when needed.
Sahil Batrab6750c8e005e
diff --git a/web/src/resize.ts b/web/src/resize.tsindex 57f7d6d74a5..f3455c5c32d 100644--- a/web/src/resize.ts+++ b/web/src/resize.ts@@ -163,8 +163,17 @@ export function resize_stream_subscribers_list(): void {// This avoids the stream settings from overflowing the container and// having a scroll bar.- if ($("#stream_settings").length === 0) {- // Don't run if stream settings (like $subscriptions_info below) is not open.+ if ($("#channels_overlay_container").find(".two-pane-settings-overlay.show").length === 0) {+ // Don't run if stream settings overlay is not open.+ return;+ }++ if (+ $("#stream_settings .stream_section[data-stream-section='subscribers']").length === 0 ||+ $("#stream_settings .stream_section[data-stream-section='subscribers']").css("display") ===+ "none"+ ) {+ // Don't run if subscribers section is not opened.return;}