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.

recent_topics: Allow focus back to table from search using esc.

Aman Agrawal017fbe3fe4fb
diff --git a/static/js/hotkey.js b/static/js/hotkey.js
index 4d3acdf5027..2ce0f255602 100644
--- a/static/js/hotkey.js
+++ b/static/js/hotkey.js
@@ -478,6 +478,7 @@ exports.process_hotkey = function (e, hotkey) {
case "tab":
case "shift_tab":
case "open_recent_topics":
+ case "escape":
if (
["#recent_topics", "#", ""].includes(window.location.hash) &&
!popovers.any_active() &&
diff --git a/static/js/recent_topics.js b/static/js/recent_topics.js
index 8d40f9a8048..cad81c2f002 100644
--- a/static/js/recent_topics.js
+++ b/static/js/recent_topics.js
@@ -572,6 +572,9 @@ exports.change_focused_element = function (e, input_key) {
// on rerender when user is typing.
current_focus_elem = $("#recent_topics_search");
return true;
+ case "escape":
+ set_table_focus(row_focus, col_focus);
+ return true;
}
} else if ($elem.hasClass("btn-recent-filters")) {
switch (input_key) {