mirror of https://github.com/zulip/zulip.git
Make pressing escape also un-narrow
(imported from commit 17d2cc3e8074af332f98588ad201ec342476d51f)
This commit is contained in:
parent
9811bd5f8a
commit
adf75d48e1
|
@ -10,7 +10,7 @@ var globals =
|
|||
|
||||
// compose.js
|
||||
+ ' show_compose hide_compose toggle_compose compose_button'
|
||||
+ ' compose_stream_name validate_message'
|
||||
+ ' composing_message compose_stream_name validate_message'
|
||||
+ ' status_classes'
|
||||
|
||||
// dom_access.js
|
||||
|
|
|
@ -42,6 +42,10 @@ function composing_huddle_message() {
|
|||
return $("#personal-message").is(":visible");
|
||||
}
|
||||
|
||||
function composing_message() {
|
||||
return composing_stream_message() || composing_huddle_message();
|
||||
}
|
||||
|
||||
function compose_stream_name() {
|
||||
return $.trim($("#stream").val());
|
||||
}
|
||||
|
|
|
@ -74,8 +74,12 @@ function process_hotkey(code) {
|
|||
select_message(get_last_visible(), false);
|
||||
}
|
||||
return false;
|
||||
case 27: // Esc: hide compose pane
|
||||
hide_compose();
|
||||
case 27: // Esc: hide compose pane or un-narrow
|
||||
if (composing_message()) {
|
||||
hide_compose();
|
||||
} else {
|
||||
show_all_messages();
|
||||
}
|
||||
return process_hotkey;
|
||||
case 99: // 'c': compose
|
||||
compose_button();
|
||||
|
|
Loading…
Reference in New Issue