fix(app): contain triple-click selection to one message bubble
Triple-clicking a message extended the document Range across the sibling composer and into the textarea, copying both on Cmd+C. Mark the messages region non-selectable on web and re-enable selection on each bubble's outer container so triple-click stays scoped.
This commit is contained in:
@@ -318,6 +318,7 @@ const userMessageStylesheet = StyleSheet.create((theme) => ({
|
||||
flexDirection: "row",
|
||||
justifyContent: "flex-end",
|
||||
paddingHorizontal: theme.spacing[2],
|
||||
userSelect: isWeb ? "text" : "auto",
|
||||
},
|
||||
content: {
|
||||
alignItems: "flex-end",
|
||||
@@ -492,6 +493,7 @@ export const assistantMessageStylesheet = StyleSheet.create((theme) => ({
|
||||
container: {
|
||||
paddingHorizontal: theme.spacing[2],
|
||||
paddingVertical: theme.spacing[3],
|
||||
userSelect: isWeb ? "text" : "auto",
|
||||
},
|
||||
containerCompactTop: {
|
||||
paddingTop: 0,
|
||||
|
||||
@@ -14,7 +14,7 @@ import { FileDropZone } from "@/components/file-drop-zone";
|
||||
import type { ImageAttachment } from "@/components/message-input";
|
||||
import { getProviderIcon } from "@/components/provider-icons";
|
||||
import { ToastViewport, useToastHost } from "@/components/toast-host";
|
||||
import { isNative } from "@/constants/platform";
|
||||
import { isNative, isWeb } from "@/constants/platform";
|
||||
import { useAgentAttentionClear } from "@/hooks/use-agent-attention-clear";
|
||||
import { useAgentInitialization } from "@/hooks/use-agent-initialization";
|
||||
import { useAgentInputDraft } from "@/hooks/use-agent-input-draft";
|
||||
@@ -1349,6 +1349,7 @@ const styles = StyleSheet.create((theme) => ({
|
||||
contentContainer: {
|
||||
flex: 1,
|
||||
overflow: "hidden",
|
||||
...(isWeb ? { userSelect: "none" as const } : {}),
|
||||
},
|
||||
content: {
|
||||
flex: 1,
|
||||
|
||||
Reference in New Issue
Block a user