From ad42418089cf46f548f4c889a096f183047c097b Mon Sep 17 00:00:00 2001 From: donteatfriedrice Date: Wed, 14 Aug 2024 07:27:17 +0000 Subject: [PATCH] fix: add hover enter delay for ask ai button (#7872) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [AF-1075](https://linear.app/affine-design/issue/AF-1075/双击选中内容的时候,如果-toolbar-出现在内容上方,ai-action-会自动展开) --- .../presets/ai/_common/components/ask-ai-button.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/frontend/core/src/blocksuite/presets/ai/_common/components/ask-ai-button.ts b/packages/frontend/core/src/blocksuite/presets/ai/_common/components/ask-ai-button.ts index 8bd1fa116c64b..e77c1b4774a3e 100644 --- a/packages/frontend/core/src/blocksuite/presets/ai/_common/components/ask-ai-button.ts +++ b/packages/frontend/core/src/blocksuite/presets/ai/_common/components/ask-ai-button.ts @@ -52,6 +52,7 @@ export class AskAIButton extends WithDisposable(LitElement) { .ask-ai-button { border-radius: 4px; position: relative; + user-select: none; } .ask-ai-icon-button { @@ -110,7 +111,10 @@ export class AskAIButton extends WithDisposable(LitElement) { }, }; }, - { allowMultiple: true } + { + allowMultiple: true, + enterDelay: 100, + } ); @property({ attribute: false })