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.

gifs: Focus compose box on closing picker with Escape.

apoorvapendse26574ce420d4
diff --git a/web/src/hotkey.ts b/web/src/hotkey.ts
index 4c3d49fd1f1..d2715efddb1 100644
--- a/web/src/hotkey.ts
+++ b/web/src/hotkey.ts
@@ -432,6 +432,12 @@ function process_escape_key(e: JQuery.KeyDownEvent): boolean {
return true;
}
+ // Hide the GIF picker if it was open and focus the compose textarea.
+ if (!gif_picker_ui.is_popped_from_edit_message() && gif_picker_ui.hide_picker_popover()) {
+ $("textarea#compose-textarea").trigger("focus");
+ return true;
+ }
+
if (popovers.any_active()) {
popovers.hide_all();
return true;