1
0
mirror of https://github.com/spacebarchat/client.git synced 2024-11-22 02:12:38 +01:00

fix not being able to send messages on touchscreen devices

This commit is contained in:
Puyodead1 2023-12-24 15:48:06 -05:00
parent 0dbb5a7fe2
commit 64f8c42de7
No known key found for this signature in database
GPG Key ID: A4FA4FEC0DD353FC

View File

@ -12,7 +12,6 @@ import Guild from "../../stores/objects/Guild";
import Snowflake from "../../utils/Snowflake"; import Snowflake from "../../utils/Snowflake";
import { MAX_ATTACHMENTS } from "../../utils/constants"; import { MAX_ATTACHMENTS } from "../../utils/constants";
import { debounce } from "../../utils/debounce"; import { debounce } from "../../utils/debounce";
import { isTouchscreenDevice } from "../../utils/isTouchscreenDevice";
import MessageTextArea from "./MessageTextArea"; import MessageTextArea from "./MessageTextArea";
import AttachmentUpload from "./attachments/AttachmentUpload"; import AttachmentUpload from "./attachments/AttachmentUpload";
import AttachmentUploadList from "./attachments/AttachmentUploadPreview"; import AttachmentUploadList from "./attachments/AttachmentUploadPreview";
@ -138,7 +137,7 @@ function MessageInput({ channel }: Props) {
// TODO: handle editing last message // TODO: handle editing last message
if (!e.shiftKey && e.key === "Enter" && !isTouchscreenDevice) { if (!e.shiftKey && e.key === "Enter") {
e.preventDefault(); e.preventDefault();
return sendMessage(); return sendMessage();
} }