From ab6c638da2d5317c8a8b07167a82cffa78d3fb5a Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Thu, 13 Jul 2023 11:33:51 +0200 Subject: [PATCH] FIX: prevent default event on touchend reaction (#22588) This was causing this event to cause other touch events down the road. For example click a reaction above the composer when the message action was opened could cause the composer to gain focus after the reaction was made. --- .../javascripts/discourse/components/chat-message-reaction.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-message-reaction.js b/plugins/chat/assets/javascripts/discourse/components/chat-message-reaction.js index 99b88884b2c..ef5b1bac146 100644 --- a/plugins/chat/assets/javascripts/discourse/components/chat-message-reaction.js +++ b/plugins/chat/assets/javascripts/discourse/components/chat-message-reaction.js @@ -90,6 +90,8 @@ export default class ChatMessageReaction extends Component { @action onTouchEnd(event) { + event.preventDefault(); + if (this.touching) { this.handleClick(event); }