From a430284aa21e3ae1f0d5654e55b2ad2852519cc2 Mon Sep 17 00:00:00 2001
From: wwf <yearningwang@iqtogether.com>
Date: 星期三, 04 六月 2025 15:17:49 +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