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/15285

Vanessa369dbef5c803
diff --git a/app/src/mobile/menu/search.ts b/app/src/mobile/menu/search.ts
index 95444b1512..642b943aa3 100644
--- a/app/src/mobile/menu/search.ts
+++ b/app/src/mobile/menu/search.ts
@@ -266,7 +266,8 @@ export const updateSearchResult = (config: Config.IUILayoutTabSearchConfig, elem
const previousElement = element.querySelector('[data-type="previous"]');
const nextElement = element.querySelector('[data-type="next"]');
const inputElement = document.getElementById("toolbarSearch") as HTMLInputElement;
- if (inputElement.value === "" && (!config.idPath || config.idPath.length === 0)) {
+ config.query = inputElement.value;
+ if (config.query === "" && (!config.idPath || config.idPath.length === 0)) {
fetchPost("/api/block/getRecentUpdatedBlocks", {}, (response) => {
onRecentBlocks(response.data, config, undefined, focusId);
loadingElement.classList.add("fn__none");
@@ -283,7 +284,7 @@ export const updateSearchResult = (config: Config.IUILayoutTabSearchConfig, elem
previousElement.setAttribute("disabled", "disabled");
}
fetchPost("/api/search/fullTextSearchBlock", {
- query: inputElement.value,
+ query: config.query,
method: config.method,
types: config.types,
paths: config.idPath || [],