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:
+2
-2
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user