Add CTRL + ENTER to force send message.

Fix: cursor jumping to the end of message area.
Fix: inconsistent message send button on mobile.
This commit is contained in:
Paul
2021-08-30 18:01:32 +01:00
parent 648f0bbf73
commit 08c963e715
5 changed files with 36 additions and 19 deletions

View File

@@ -6,6 +6,7 @@ import { decodeTime } from "ulid";
import { Text } from "preact-i18n";
import { useDictionary } from "../../../lib/i18n";
import { isTouchscreenDevice } from "../../../lib/isTouchscreenDevice";
import { dayjs } from "../../../context/Locale";
@@ -34,9 +35,11 @@ export default styled.div<BaseMessageProps>`
flex-direction: row;
padding-inline-end: 16px;
@media (pointer: coarse) {
user-select: none;
}
${() =>
isTouchscreenDevice &&
css`
user-select: none;
`}
${(props) =>
props.contrast &&