Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
giphy: Convert `compose_giphy_logo` from id to class.
Aman Agrawald4fa938a23d7
diff --git a/static/js/click_handlers.js b/static/js/click_handlers.jsindex 60c8480d0f3..3428d8bedf8 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, #compose_giphy_logo")) {+ if ($(e.target).is("#emoji_map, img.emoji, .drag, .compose_giphy_logo")) {return;}diff --git a/static/js/giphy.js b/static/js/giphy.jsindex c14211a8d16..f1c88ec5c60 100644--- a/static/js/giphy.js+++ b/static/js/giphy.js@@ -101,9 +101,9 @@ function update_grid_with_search_term() {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);+ $("body").on("keydown", ".compose_giphy_logo", ui_util.convert_enter_to_click);- $("body").on("click", "#compose_giphy_logo", (e) => {+ $("body").on("click", ".compose_giphy_logo", (e) => {e.preventDefault();e.stopPropagation();diff --git a/templates/zerver/app/compose.html b/templates/zerver/app/compose.htmlindex 0059841c2f9..2dae109a886 100644--- a/templates/zerver/app/compose.html+++ b/templates/zerver/app/compose.html@@ -103,7 +103,7 @@<a role="button" class="message-control-button fa fa-smile-o" aria-label="{{_('Add emoji')}}" id="emoji_map" tabindex=0 title="{{ _('Add emoji') }}"></a>{% if giphy_api_available %}<a role="button" class="message-control-button" aria-label="{{_('Add GIF')}}" id="compose_box_giphy_grid" title="{{ _('Add GIF') }}">- <img id="compose_giphy_logo" tabindex=0 src="/static/images/GIPHY_logo.png">+ <img class="compose_giphy_logo" tabindex=0 src="/static/images/GIPHY_logo.png"></a>{% endif %}<a class="message-control-link drafts-link" href="#drafts" title="{{ _('Drafts') }} (d)">{{ _('Drafts') }}</a>