diff --git a/packages/frontend/core/src/blocksuite/ai/chat-panel/content/pure-text.ts b/packages/frontend/core/src/blocksuite/ai/chat-panel/content/pure-text.ts index 167f14adf9..610c390195 100644 --- a/packages/frontend/core/src/blocksuite/ai/chat-panel/content/pure-text.ts +++ b/packages/frontend/core/src/blocksuite/ai/chat-panel/content/pure-text.ts @@ -40,9 +40,14 @@ export class ChatContentPureText extends ShadowlessElement { @property({ attribute: 'data-testid', reflect: true }) accessor testId = 'chat-content-pure-text'; + stopPropagation(event: Event) { + event.stopPropagation(); + } + protected override render() { return this.text.length > 0 - ? html`
${this.text}
` + ? // prettier-ignore + html`
${this.text}
` : nothing; } } diff --git a/packages/frontend/core/src/blocksuite/ai/components/ai-chat-input/ai-chat-input.ts b/packages/frontend/core/src/blocksuite/ai/components/ai-chat-input/ai-chat-input.ts index af9ca25291..2c5b9acfe7 100644 --- a/packages/frontend/core/src/blocksuite/ai/components/ai-chat-input/ai-chat-input.ts +++ b/packages/frontend/core/src/blocksuite/ai/components/ai-chat-input/ai-chat-input.ts @@ -492,6 +492,7 @@ export class AIChatInput extends SignalWatcher( }; private readonly _handlePaste = (event: ClipboardEvent) => { + event.stopPropagation(); const items = event.clipboardData?.items; if (!items) return;