diff --git a/src/app/components/message/layout/Base.tsx b/src/app/components/message/layout/Base.tsx
index ca7e8c95a..7318ec389 100644
--- a/src/app/components/message/layout/Base.tsx
+++ b/src/app/components/message/layout/Base.tsx
@@ -13,6 +13,7 @@ export const MessageBase = as<'div', css.MessageBaseVariants>(
collapse,
autoCollapse,
space,
+ mobile,
...props
},
ref
@@ -27,6 +28,7 @@ export const MessageBase = as<'div', css.MessageBaseVariants>(
collapse,
autoCollapse,
space,
+ mobile,
}),
className
)}
diff --git a/src/app/components/message/layout/layout.css.ts b/src/app/components/message/layout/layout.css.ts
index ac6cd5620..ba8b39682 100644
--- a/src/app/components/message/layout/layout.css.ts
+++ b/src/app/components/message/layout/layout.css.ts
@@ -65,6 +65,15 @@ export const messageJumpHighlight = style({
animationIterationCount: 'infinite',
});
+const MobileVariant = styleVariants({
+ true: {
+ WebkitUserSelect: 'none',
+ msUserSelect: 'none',
+ userSelect: 'none',
+ MozUserSelect: 'none',
+ },
+});
+
const HighlightVariant = styleVariants({
true: [messageJumpHighlight],
});
@@ -124,6 +133,7 @@ export const MessageBase = recipe({
notifyHighlight: NotifyHighlightVariant,
selected: SelectedVariant,
isMarked: MarkedVariant,
+ mobile: MobileVariant,
},
defaultVariants: {
space: '400',
diff --git a/src/app/features/room/RoomTimeline.tsx b/src/app/features/room/RoomTimeline.tsx
index 18698fcdc..d73ed9745 100644
--- a/src/app/features/room/RoomTimeline.tsx
+++ b/src/app/features/room/RoomTimeline.tsx
@@ -1029,6 +1029,12 @@ export function RoomTimeline({
timelineSync.setTimeline(getInitialTimeline(room));
scrollToBottom();
}}
+ style={{
+ WebkitUserSelect: 'none',
+ msUserSelect: 'none',
+ userSelect: 'none',
+ MozUserSelect: 'none',
+ }}
>
Jump to Latest
diff --git a/src/app/features/room/message/Message.tsx b/src/app/features/room/message/Message.tsx
index 02f29381b..56000ba4d 100644
--- a/src/app/features/room/message/Message.tsx
+++ b/src/app/features/room/message/Message.tsx
@@ -890,7 +890,7 @@ function MessageInternal(
const handleContextMenu: MouseEventHandler = (evt) => {
if (mobileOrTablet()) {
evt.preventDefault();
- return;
+ setMobileOptionsOpen(true);
}
if (evt.altKey || !window.getSelection()?.isCollapsed || edit) return;
@@ -971,6 +971,7 @@ function MessageInternal(
notifyHighlight={highlightMentions ? notifyHighlight : undefined}
selected={!!menuAnchor || !!emojiBoardAnchor}
isMarked={isMarked}
+ mobile={mobileOrTablet()}
{...props}
{...hoverProps}
{...focusWithinProps}
@@ -1413,7 +1414,7 @@ export const Event = as<'div', EventProps>(
const handleContextMenu: MouseEventHandler = (evt) => {
if (mobileOrTablet()) {
evt.preventDefault();
- return;
+ setMobileOptionsOpen(true);
}
if (evt.altKey || !window.getSelection()?.isCollapsed) return;
@@ -1488,6 +1489,7 @@ export const Event = as<'div', EventProps>(
notifyHighlight={highlightMentions ? notifyHighlight : undefined}
selected={!!menuAnchor}
isMarked={isMarked}
+ mobile={mobileOrTablet()}
{...props}
{...hoverProps}
{...focusWithinProps}