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.

hotkey: Fix Enter hotkey not toggling buttons in drafts overlay.

Pritesh Shetty3edee5957282
diff --git a/web/src/hotkey.ts b/web/src/hotkey.ts
index bea6072c9e1..0e4fb7b0d8d 100644
--- a/web/src/hotkey.ts
+++ b/web/src/hotkey.ts
@@ -652,6 +652,10 @@ function process_enter_key(e: JQuery.KeyDownEvent): boolean {
// This handles when pressing Enter while looking at drafts.
// It restores draft that is focused.
if (overlays.drafts_open()) {
+ const $draft_overlay = $("#draft_overlay");
+ if ($draft_overlay.find("a:focus, button:focus, input:focus").length > 0) {
+ return false;
+ }
drafts_overlay_ui.handle_keyboard_events("enter");
return true;
}