Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
more topics: Escape clears input when input is focused.
evykassirera764a3e66f05
diff --git a/web/src/hotkey.js b/web/src/hotkey.jsindex 8aa3c920204..dca042d3593 100644--- a/web/src/hotkey.js+++ b/web/src/hotkey.js@@ -54,6 +54,7 @@ import * as stream_data from "./stream_data";import * as stream_list from "./stream_list";import * as stream_popover from "./stream_popover";import * as stream_settings_ui from "./stream_settings_ui";+import * as topic_list from "./topic_list";import * as unread_ops from "./unread_ops";import * as user_card_popover from "./user_card_popover";import * as user_group_popover from "./user_group_popover";@@ -336,6 +337,13 @@ export function process_escape_key(e) {return true;}+ // 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() && $("#filter-topic-input").is(":focus")) {+ topic_list.clear_topic_search(e);+ return true;+ }+// We pressed Esc and something was focused, and the composebox// wasn't open. In that case, we should blur the input.$("input:focus,textarea:focus").trigger("blur");