From 01a0f8298fed92037872472bd16194bdea4ee43d Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Fri, 12 Apr 2024 10:01:53 +0200 Subject: [PATCH] FIX: ensures reply is unlocking body scroll (#26616) Prior to this fix we were calling the action before closing the menu which could cause various callbacks, like the enable body scroll one, to not be called as some actions will do: `chat.activeMessage = null;` causing the message actions menu to be instantly destroyed. --- .../discourse/components/chat-message-actions-mobile.gjs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-message-actions-mobile.gjs b/plugins/chat/assets/javascripts/discourse/components/chat-message-actions-mobile.gjs index d09dd8e1068..b59b686abd5 100644 --- a/plugins/chat/assets/javascripts/discourse/components/chat-message-actions-mobile.gjs +++ b/plugins/chat/assets/javascripts/discourse/components/chat-message-actions-mobile.gjs @@ -21,7 +21,6 @@ export default class ChatMessageActionsMobile extends Component { @service capabilities; @tracked hasExpandedReply = false; - @tracked showFadeIn = false; get message() { return this.chat.activeMessage.model; @@ -60,14 +59,14 @@ export default class ChatMessageActionsMobile extends Component { @action actAndCloseMenu(fnId) { - this.messageInteractor[fnId](); this.args.closeModal(); + this.messageInteractor[fnId](); } @action openEmojiPicker(_, event) { - this.messageInteractor.openEmojiPicker(_, event); this.args.closeModal(); + this.messageInteractor.openEmojiPicker(_, event); }