From 2a506940893beeef0cc2d540726e71dc1a906a1f Mon Sep 17 00:00:00 2001 From: Debanjum Singh Solanky Date: Tue, 22 Oct 2024 21:20:22 -0700 Subject: [PATCH] Allow typing multi-line queries from a phone with Enter key Add newline instead of sending message when hit Enter key on mobile displays. As on phones shift key doesn't exist and send button is easily clickable. Limit hitting Enter key to send message to computers = larger display = expected to have full fledged keyboards. --- .../web/app/components/chatInputArea/chatInputArea.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/interface/web/app/components/chatInputArea/chatInputArea.tsx b/src/interface/web/app/components/chatInputArea/chatInputArea.tsx index 195abe1e..7f2baf1d 100644 --- a/src/interface/web/app/components/chatInputArea/chatInputArea.tsx +++ b/src/interface/web/app/components/chatInputArea/chatInputArea.tsx @@ -460,7 +460,7 @@ export const ChatInputArea = forwardRef((pr autoFocus={true} value={message} onKeyDown={(e) => { - if (e.key === "Enter" && !e.shiftKey) { + if (e.key === "Enter" && !e.shiftKey && !props.isMobileWidth) { setImageUploaded(false); setImagePaths([]); e.preventDefault();