diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-message.js b/plugins/chat/assets/javascripts/discourse/components/chat-message.js index b2e6d09abac..4de0a790ad9 100644 --- a/plugins/chat/assets/javascripts/discourse/components/chat-message.js +++ b/plugins/chat/assets/javascripts/discourse/components/chat-message.js @@ -281,11 +281,15 @@ export default class ChatMessage extends Component { } @action - onLongPressStart() { + onLongPressStart(element, event) { if (!this.args.message.expanded) { return; } + if (event.target.tagName === "IMG") { + return; + } + // prevents message to show as active when starting scroll // at this moment scroll has no momentum and the row can // capture the touch event instead of a scroll @@ -312,7 +316,11 @@ export default class ChatMessage extends Component { } @action - onLongPressEnd() { + onLongPressEnd(element, event) { + if (event.target.tagName === "IMG") { + return; + } + cancel(this._makeMessageActiveHandler); this.isActive = false;