From 44b5725793572dc719f07916eb83520ded52e01f Mon Sep 17 00:00:00 2001 From: Paul Date: Mon, 2 Aug 2021 13:06:18 +0100 Subject: [PATCH] Disallow text selection in messages on mobile. --- src/components/common/messaging/MessageBase.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/components/common/messaging/MessageBase.tsx b/src/components/common/messaging/MessageBase.tsx index 2149cb23..2a79f405 100644 --- a/src/components/common/messaging/MessageBase.tsx +++ b/src/components/common/messaging/MessageBase.tsx @@ -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,6 +35,10 @@ export default styled.div` flex-direction: row; padding-right: 16px; + @media (pointer: coarse) { + user-select: none; + } + ${(props) => props.contrast && css`