mirror of
https://github.com/zulip/zulip.git
synced 2025-11-21 15:09:34 +00:00
recent_topics: Allow focus back to table from search using esc.
User can now use `escape` key to switch focus from search to table without using arrow keys to do so.
This commit is contained in:
@@ -478,6 +478,7 @@ exports.process_hotkey = function (e, hotkey) {
|
|||||||
case "tab":
|
case "tab":
|
||||||
case "shift_tab":
|
case "shift_tab":
|
||||||
case "open_recent_topics":
|
case "open_recent_topics":
|
||||||
|
case "escape":
|
||||||
if (
|
if (
|
||||||
["#recent_topics", "#", ""].includes(window.location.hash) &&
|
["#recent_topics", "#", ""].includes(window.location.hash) &&
|
||||||
!popovers.any_active() &&
|
!popovers.any_active() &&
|
||||||
|
|||||||
@@ -572,6 +572,9 @@ exports.change_focused_element = function (e, input_key) {
|
|||||||
// on rerender when user is typing.
|
// on rerender when user is typing.
|
||||||
current_focus_elem = $("#recent_topics_search");
|
current_focus_elem = $("#recent_topics_search");
|
||||||
return true;
|
return true;
|
||||||
|
case "escape":
|
||||||
|
set_table_focus(row_focus, col_focus);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
} else if ($elem.hasClass("btn-recent-filters")) {
|
} else if ($elem.hasClass("btn-recent-filters")) {
|
||||||
switch (input_key) {
|
switch (input_key) {
|
||||||
|
|||||||
Reference in New Issue
Block a user