From ab75c4f7c9f854389e8de56b9f5312a559a8fe3b Mon Sep 17 00:00:00 2001 From: Aman Agrawal Date: Wed, 13 Aug 2025 23:25:10 +0530 Subject: [PATCH] sidebar_ui: Fix selection box disappears while navigating to muted row. This happens since the don't exclude the row which toggles muted / inactive channels from all_rows, while user is searching and hence selections box ends up there while navigating to the muted / inactive channel row. --- web/src/sidebar_ui.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/web/src/sidebar_ui.ts b/web/src/sidebar_ui.ts index 14cb08e182..3ed230ef72 100644 --- a/web/src/sidebar_ui.ts +++ b/web/src/sidebar_ui.ts @@ -487,11 +487,17 @@ function all_rows(): JQuery { ".stream-list-section-container.collapsed .topic-list-item:not(.active-sub-filter).bottom_left_row", ); + // Exclude toggle inactive / muted channels row from the list of rows if user is searching. + const $toggle_inactive_or_muted_channels_row = $( + "#streams_list.is_searching .stream-list-toggle-inactive-or-muted-channels.bottom_left_row", + ); + return $all_rows .not($inactive_or_muted_rows) .not($collapsed_views) .not($collapsed_channels) - .not($hidden_topic_rows); + .not($hidden_topic_rows) + .not($toggle_inactive_or_muted_channels_row); } class LeftSidebarListCursor extends ListCursor {