mirror of https://github.com/zulip/zulip.git
giphy: Convert `compose_giphy_logo` from id to class.
Since there are multiple `compose_giphy_logo` elements, we should use it as a class as per HTML spec.
This commit is contained in:
parent
a2140eb9b5
commit
d4fa938a23
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue