From 67f019713a61eb953851b14e3d77d6513d35ba9d Mon Sep 17 00:00:00 2001 From: CrescentLeaf Date: Thu, 2 Oct 2025 20:54:39 +0800 Subject: [PATCH] =?UTF-8?q?ui:=20=E4=BF=AE=E6=AD=A3=20=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E5=8F=B3=E9=8D=B5=E8=8F=9C=E5=96=AE=20*=20=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=E6=89=93=E9=96=8B=E7=8B=80=E6=85=8B=20*=20=E9=81=BF=E5=85=8D?= =?UTF-8?q?=E4=B8=8D=E5=BF=85=E8=A6=81=E7=9A=84=E7=8B=80=E6=85=8B=E8=AE=8A?= =?UTF-8?q?=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/ui/chat/Message.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/client/ui/chat/Message.tsx b/client/ui/chat/Message.tsx index 6e4693b..79b531c 100644 --- a/client/ui/chat/Message.tsx +++ b/client/ui/chat/Message.tsx @@ -33,6 +33,9 @@ export default function Message({ userId, rawData, renderHTML, message, ...props const dropDownRef = React.useRef(null) const messageJsonDialogRef = React.useRef(null) + useEventListener(messageJsonDialogRef, 'click', (e) => { + e.stopPropagation() + }) const [isDropDownOpen, setDropDownOpen] = React.useState(false) @@ -116,7 +119,10 @@ export default function Message({ userId, rawData, renderHTML, message, ...props dangerouslySetInnerHTML={{ __html: renderHTML }} /> - e.stopPropagation()}> + { + e.stopPropagation() + setDropDownOpen(false) + }}> copyToClipboard($(dropDownRef.current as HTMLElement).find('#msg').text())}>複製文字 copyToClipboard(rawData)}>複製原文 messageJsonDialogRef.current.open = true}>查看詳情