From 54fe110aae325804080d7db9466cd9c68fa0661d Mon Sep 17 00:00:00 2001 From: Tiago Evangelista Date: Wed, 24 Jul 2024 01:25:19 -0300 Subject: [PATCH] fix --- .../client/views/room/composer/messageBox/MessageBox.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/meteor/client/views/room/composer/messageBox/MessageBox.tsx b/apps/meteor/client/views/room/composer/messageBox/MessageBox.tsx index 00d9c66a2046..89b177d296d2 100644 --- a/apps/meteor/client/views/room/composer/messageBox/MessageBox.tsx +++ b/apps/meteor/client/views/room/composer/messageBox/MessageBox.tsx @@ -192,6 +192,10 @@ const MessageBox = ({ const isSubmitKey = keyCode === keyCodes.CARRIAGE_RETURN || keyCode === keyCodes.NEW_LINE; if (isSubmitKey) { + if (popup) { + return; + } + const withModifier = event.shiftKey || event.ctrlKey || event.altKey || event.metaKey; const isSending = (sendOnEnter && !withModifier) || (!sendOnEnter && withModifier); @@ -357,7 +361,8 @@ const MessageBox = ({ [handler], ); - const mergedRefs = useMessageComposerMergedRefs(c, textareaRef, callbackRef, autofocusRef, keyDownHandlerCallbackRef); + // TODO: Fix this! Parameter order matters here! + const mergedRefs = useMessageComposerMergedRefs(keyDownHandlerCallbackRef, c, textareaRef, callbackRef, autofocusRef); const shouldPopupPreview = useEnablePopupPreview(filter, popup);