Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagoevanp committed Jul 24, 2024
1 parent 05db8aa commit 54fe110
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 54fe110

Please sign in to comment.