From 77950e48c76f4a3b29d01831d43039caba29888a Mon Sep 17 00:00:00 2001
From: wwf <1971391498@qq.com>
Date: 星期二, 18 十一月 2025 14:12:42 +0800
Subject: [PATCH] 修改
---
app/components/base/prompt-editor/plugins/on-blur-or-focus-block.tsx | 18 ++++++++----------
1 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/app/components/base/prompt-editor/plugins/on-blur-or-focus-block.tsx b/app/components/base/prompt-editor/plugins/on-blur-or-focus-block.tsx
index 246fd96..2e3adc1 100644
--- a/app/components/base/prompt-editor/plugins/on-blur-or-focus-block.tsx
+++ b/app/components/base/prompt-editor/plugins/on-blur-or-focus-block.tsx
@@ -37,16 +37,14 @@
),
editor.registerCommand(
BLUR_COMMAND,
- (event) => {
- // Check if the clicked target element is var-search-input
- const target = event?.relatedTarget as HTMLElement
- if (!target?.classList?.contains('var-search-input')) {
- ref.current = setTimeout(() => {
- editor.dispatchCommand(KEY_ESCAPE_COMMAND, new KeyboardEvent('keydown', { key: 'Escape' }))
- }, 200)
- if (onBlur)
- onBlur()
- }
+ () => {
+ ref.current = setTimeout(() => {
+ editor.dispatchCommand(KEY_ESCAPE_COMMAND, new KeyboardEvent('keydown', { key: 'Escape' }))
+ }, 200)
+
+ if (onBlur)
+ onBlur()
+
return true
},
COMMAND_PRIORITY_EDITOR,
--
Gitblit v1.8.0