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.

compose: Disable 'c' and 'x' hotkeys while compose is open.

somesh20268a1912f89c9
diff --git a/static/js/hotkey.js b/static/js/hotkey.js
index f02ea02e22f..4fd034454ad 100644
--- a/static/js/hotkey.js
+++ b/static/js/hotkey.js
@@ -806,10 +806,14 @@ export function process_hotkey(e, hotkey) {
compose_actions.respond_to_message({trigger: "hotkey"});
return true;
case "compose": // 'c': compose
- compose_actions.start("stream", {trigger: "compose_hotkey"});
+ if (!compose_state.composing()) {
+ compose_actions.start("stream", {trigger: "compose_hotkey"});
+ }
return true;
case "compose_private_message":
- compose_actions.start("private", {trigger: "compose_hotkey"});
+ if (!compose_state.composing()) {
+ compose_actions.start("private", {trigger: "compose_hotkey"});
+ }
return true;
case "open_drafts":
browser_history.go_to_location("drafts");