mirror of https://github.com/zulip/zulip.git
Allow 'Esc' to clear a keyboard-driven Find.
(imported from commit d48028531b6e7286d177790ec5adb2e5f256b1e0)
This commit is contained in:
parent
64b3f072fe
commit
4bb330bb21
|
@ -93,11 +93,13 @@ function process_hotkey(e) {
|
||||||
select_message(rows.last_visible(), {then_scroll: false});
|
select_message(rows.last_visible(), {then_scroll: false});
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
case 27: // Esc: close userinfo popup, cancel compose, or un-narrow
|
case 27: // Esc: close userinfo popup, cancel compose, clear a find, or un-narrow
|
||||||
if (ui.userinfo_currently_popped()) {
|
if (ui.userinfo_currently_popped()) {
|
||||||
ui.hide_userinfo_popover();
|
ui.hide_userinfo_popover();
|
||||||
} else if (compose.composing()) {
|
} else if (compose.composing()) {
|
||||||
compose.cancel();
|
compose.cancel();
|
||||||
|
} else if (search.keyboard_currently_finding()) {
|
||||||
|
search.clear_search();
|
||||||
} else {
|
} else {
|
||||||
narrow.show_all_messages();
|
narrow.show_all_messages();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue