Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: https://github.com/siyuan-note/siyuan/issues/12046

Vanessa52e224d28245
diff --git a/app/src/search/menu.ts b/app/src/search/menu.ts
index 4911e825ad..82e3c0ec5b 100644
--- a/app/src/search/menu.ts
+++ b/app/src/search/menu.ts
@@ -317,7 +317,8 @@ export const saveCriterion = (config: Config.IUILayoutTabSearchConfig,
saveDialog.destroy();
});
btnsElement[1].addEventListener("click", () => {
- const value = saveDialog.element.querySelector("input").value.trim();
+ const inputElement = saveDialog.element.querySelector("input")
+ const value = inputElement.value.trim();
if (!value) {
showMessage(window.siyuan.languages["_kernel"]["142"]);
return;
@@ -340,6 +341,7 @@ export const saveCriterion = (config: Config.IUILayoutTabSearchConfig,
hasSameConfig = item.name;
}
});
+ inputElement.blur();
if (hasSameName && !hasSameConfig) {
confirmDialog(window.siyuan.languages.confirm, window.siyuan.languages.searchOverwrite, () => {
Array.from(criteriaElement.children).forEach(item => {