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.

giphy: Delegate `compose_giphy_logo` click handler to `body`.

Aman Agrawala2140eb9b58d
diff --git a/static/js/click_handlers.js b/static/js/click_handlers.js
index 8d04824e5e8..60c8480d0f3 100644
--- a/static/js/click_handlers.js
+++ b/static/js/click_handlers.js
@@ -650,7 +650,7 @@ export function initialize() {
function handle_compose_click(e) {
// Emoji clicks should be handled by their own click handler in emoji_picker.js
- if ($(e.target).is("#emoji_map, img.emoji, .drag")) {
+ if ($(e.target).is("#emoji_map, img.emoji, .drag, #compose_giphy_logo")) {
return;
}
diff --git a/static/js/giphy.js b/static/js/giphy.js
index 2bfd61075c7..c14211a8d16 100644
--- a/static/js/giphy.js
+++ b/static/js/giphy.js
@@ -103,7 +103,7 @@ export function initialize() {
$("body").on("keydown", ".giphy-gif", ui_util.convert_enter_to_click);
$("body").on("keydown", "#compose_giphy_logo", ui_util.convert_enter_to_click);
- $("#compose_giphy_logo").on("click", (e) => {
+ $("body").on("click", "#compose_giphy_logo", (e) => {
e.preventDefault();
e.stopPropagation();