Skip to content

A platform for community discussion. Free, open, simple.

FIX: disables tooltip on desktop message menu’s reaction (#24650)

Joffrey JAFFEUXbcca1692c60b
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-message-actions-desktop.gjs b/plugins/chat/assets/javascripts/discourse/components/chat-message-actions-desktop.gjs
index bacbfe11ff7..710fa5da92c 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat-message-actions-desktop.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat-message-actions-desktop.gjs
@@ -142,6 +142,7 @@ export default class ChatMessageActionsDesktop extends Component {
@onReaction={{this.messageInteractor.react}}
@message={{this.message}}
@showCount={{false}}
+ @disableTooltip={{true}}
/>
{{/each}}
{{/if}}
diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-message-reaction.gjs b/plugins/chat/assets/javascripts/discourse/components/chat-message-reaction.gjs
index aaee26fad16..db7b912ebfc 100644
--- a/plugins/chat/assets/javascripts/discourse/components/chat-message-reaction.gjs
+++ b/plugins/chat/assets/javascripts/discourse/components/chat-message-reaction.gjs
@@ -19,7 +19,7 @@ export default class ChatMessageReaction extends Component {
@tracked isActive = false;
registerTooltip = modifier((element) => {
- if (!this.popoverContent?.length) {
+ if (this.disableTooltip || !this.popoverContent?.length) {
return;
}
@@ -37,6 +37,10 @@ export default class ChatMessageReaction extends Component {
};
});
+ get disableTooltip() {
+ return this.args.disableTooltip ?? false;
+ }
+
get showCount() {
return this.args.showCount ?? true;
}