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 and improve selectors related to the topic list filter.

Sayam Samalf4ec5f9741ea
diff --git a/web/src/hotkey.js b/web/src/hotkey.js
index 3eda8c6d866..a4b5ff0c0f7 100644
--- a/web/src/hotkey.js
+++ b/web/src/hotkey.js
@@ -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;
}
diff --git a/web/src/stream_list.ts b/web/src/stream_list.ts
index ceccfe1dda9..9e257808f63 100644
--- a/web/src/stream_list.ts
+++ b/web/src/stream_list.ts
@@ -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();
diff --git a/web/src/topic_list.ts b/web/src/topic_list.ts
index 05c6930c6bd..64caba306e6 100644
--- a/web/src/topic_list.ts
+++ b/web/src/topic_list.ts
@@ -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 {