mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-23 15:38:55 +01:00
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.
This commit is contained in:
parent
a134cd835c
commit
2a50694089
1 changed files with 1 additions and 1 deletions
|
@ -460,7 +460,7 @@ export const ChatInputArea = forwardRef<HTMLTextAreaElement, ChatInputProps>((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();
|
||||
|
|
Loading…
Reference in a new issue