diff --git a/src/components/views/rooms/wysiwyg_composer/hooks/useInputEventProcessor.ts b/src/components/views/rooms/wysiwyg_composer/hooks/useInputEventProcessor.ts index 4192c4c060a..3a223fb6b1c 100644 --- a/src/components/views/rooms/wysiwyg_composer/hooks/useInputEventProcessor.ts +++ b/src/components/views/rooms/wysiwyg_composer/hooks/useInputEventProcessor.ts @@ -35,10 +35,11 @@ export function useInputEventProcessor(onSend: () => void): (event: WysiwygEvent const isKeyboardEvent = event instanceof KeyboardEvent; const isEnterPress = !isCtrlEnter && isKeyboardEvent && isEnterPressed(event); + const isInsertParagraph = !isCtrlEnter && !isKeyboardEvent && event.inputType === "insertParagraph"; // sendMessage is sent when cmd+enter is pressed const isSendMessage = isCtrlEnter && !isKeyboardEvent && event.inputType === "sendMessage"; - if (isEnterPress || isSendMessage) { + if (isEnterPress || isInsertParagraph || isSendMessage) { event.stopPropagation?.(); event.preventDefault?.(); onSend();