fix(ai): prevent context menu from appearing on message right-click

- Added `stopPropagation` to the context menu event on the AIMarkdownStreamingMessage component to prevent the default context menu from appearing, enhancing user experience during message interactions.

Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
Innei
2025-10-05 23:42:27 +08:00
parent 984887117b
commit ab5f0df64c
@@ -1,4 +1,4 @@
import { cn } from "@follow/utils"
import { cn, stopPropagation } from "@follow/utils"
import { memo, useRef } from "react"
import { MarkdownAnimateText } from "./animated/AnimatedMarkdown"
@@ -23,7 +23,7 @@ export const AIMarkdownStreamingMessage = memo(
const stableStreamingState = useRef(isStreaming)
return (
<div className={cn(className, classNameProp)}>
<div onContextMenu={stopPropagation} className={cn(className, classNameProp)}>
<MarkdownAnimateText
content={parseIncompleteMarkdown(text)}
isStreaming={stableStreamingState.current}