topic_list: Fix and improve selectors related to the topic list filter.

This commit is contained in:
Sayam Samal
2025-07-09 10:30:08 +05:30
committed by Tim Abbott
parent c75a48b63b
commit f4ec5f9741
3 changed files with 3 additions and 3 deletions

View File

@@ -453,7 +453,7 @@ export function process_escape_key(e) {
// When the input is focused, we blur and clear the input. A second "Esc"
// will zoom out, handled below.
if (stream_list.is_zoomed_in() && $("#left-sidebar-filter-topic-input").is(":focus")) {
if (stream_list.is_zoomed_in() && $("#topic_filter_query").is(":focus")) {
topic_list.clear_topic_search(e);
return true;
}

View File

@@ -425,7 +425,7 @@ export function zoom_in_topics(options: {stream_id: number | undefined}): void {
$elt.show();
// Add search box for topics list.
$elt.children("div.bottom_left_row").append($(render_filter_topics()));
$("#left-sidebar-filter-topic-input").trigger("focus");
$("#topic_filter_query").trigger("focus");
topic_list.setup_topic_search_typeahead();
} else {
$elt.hide();

View File

@@ -494,7 +494,7 @@ export function zoom_in(): void {
}
export function get_left_sidebar_topic_search_term(): string {
return $("#left-sidebar-filter-topic-input .input").text().trim();
return $("#topic_filter_query").text().trim();
}
export function get_typeahead_search_term(): string {