From b32f60d94d83f3c4abdeceaaf4f6b2008a1100f8 Mon Sep 17 00:00:00 2001 From: CrescentLeaf Date: Fri, 21 Nov 2025 21:38:15 +0800 Subject: [PATCH] =?UTF-8?q?=E9=98=BB=E6=AD=A2=E6=8F=90=E5=8F=8A=E6=96=87?= =?UTF-8?q?=E6=9C=AC=E7=82=B9=E5=87=BB=E4=BA=8B=E4=BB=B6=E5=86=92=E6=B3=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/ui/custom-elements/chat-mention.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/client/ui/custom-elements/chat-mention.ts b/client/ui/custom-elements/chat-mention.ts index 199564e..93f546b 100644 --- a/client/ui/custom-elements/chat-mention.ts +++ b/client/ui/custom-elements/chat-mention.ts @@ -34,14 +34,16 @@ customElements.define('chat-mention', class extends HTMLElement { if (chatId) { const chat = await DataCaches.getChatInfo(chatId) this.link.textContent = chat?.title - this.link.onclick = () => { + this.link.onclick = (e) => { + e.stopPropagation() // deno-lint-ignore no-window window.openChatInfoDialog(chat) } } else if (userId) { const user = await DataCaches.getUserProfile(userId) this.link.textContent = user?.nickname - this.link.onclick = () => { + this.link.onclick = (e) => { + e.stopPropagation() // deno-lint-ignore no-window window.openUserInfoDialog(user) } @@ -51,7 +53,8 @@ customElements.define('chat-mention', class extends HTMLElement { if (!(userId || chatId)) { this.link.textContent = "无效的提及" this.link.style.fontStyle = 'italic' - this.link.onclick = () => { + this.link.onclick = (e) => { + e.stopPropagation() snackbar({ message: "该提及没有指定用户或者对话!", placement: 'top',