mirror of https://github.com/zulip/zulip.git
hotkey: Don't close compose box on topic list input ESC.
Fixes https://chat.zulip.org/#narrow/stream/9-issues/topic/Pressing.20escape.20in.20topic.20filter.20closes.20compose.20box/near/1833316 Topic list escape key action should take preference over open composebox.
This commit is contained in:
parent
3f8d5ea0ab
commit
991fec5b23
|
@ -334,6 +334,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;
|
||||
}
|
||||
|
||||
if (compose_state.composing()) {
|
||||
// Check if the giphy popover was open using compose box.
|
||||
// Hide GIPHY popover if it's open.
|
||||
|
@ -353,13 +360,6 @@ 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");
|
||||
|
|
Loading…
Reference in New Issue