Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
topic_list: Move input blur on escape logic to hotkey.js module.
Sayam Samalc92e9a7229ff
diff --git a/web/src/hotkey.js b/web/src/hotkey.jsindex ec0e5ef9bbd..6c91f6b2af4 100644--- a/web/src/hotkey.js+++ b/web/src/hotkey.js@@ -454,6 +454,7 @@ export function process_escape_key(e) {// will zoom out, handled below.if (stream_list.is_zoomed_in() && $("#topic_filter_query").is(":focus")) {topic_list.clear_topic_search(e);+ $("#topic_filter_query").trigger("blur");return true;}diff --git a/web/src/topic_list.ts b/web/src/topic_list.tsindex 9db2db5646f..2317cb3af67 100644--- a/web/src/topic_list.ts+++ b/web/src/topic_list.ts@@ -389,7 +389,6 @@ export function clear_topic_search(e: JQuery.Event): void {search_pill_widget?.clear(true);const $input = $("#topic_filter_query");- $input.trigger("blur");// Since the `clear` function of the search_pill_widget// takes care of clearing both the text content and the// pills, we just need to trigger an input event on the