Skip to content

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

:art: Improve soft keyboard toolbar pop-up https://github.com/siyuan-note/siyuan/issues/16548

Daniel4326958da282
diff --git a/app/src/protyle/render/av/action.ts b/app/src/protyle/render/av/action.ts
index e5a1def55c..bf0d5cee4c 100644
--- a/app/src/protyle/render/av/action.ts
+++ b/app/src/protyle/render/av/action.ts
@@ -319,7 +319,7 @@ export const avClick = (protyle: IProtyle, event: MouseEvent & { target: HTMLEle
event.stopPropagation();
return true;
} else if (type === "av-search-icon") {
- const searchElement = blockElement.querySelector('input[data-type="av-search"]') as HTMLInputElement;
+ const searchElement = blockElement.querySelector('div[data-type="av-search"]') as HTMLInputElement;
searchElement.style.width = "128px";
searchElement.style.paddingLeft = "";
searchElement.style.paddingRight = "";
@@ -327,14 +327,7 @@ export const avClick = (protyle: IProtyle, event: MouseEvent & { target: HTMLEle
if (viewsElement) {
viewsElement.classList.add("av__views--show");
}
- /// #if MOBILE
- setTimeout(() => {
- window.JSAndroid?.showKeyboard();
- searchElement.focus();
- }, Constants.TIMEOUT_TRANSITION);
- /// #else
searchElement.focus();
- /// #endif
event.preventDefault();
event.stopPropagation();
return true;
diff --git a/app/src/protyle/render/av/render.ts b/app/src/protyle/render/av/render.ts
index a5df3aea39..04173584e5 100644
--- a/app/src/protyle/render/av/render.ts
+++ b/app/src/protyle/render/av/render.ts
@@ -100,7 +100,7 @@ export const genTabHeaderHTML = (data: IAV, showSearch: boolean, editable: boole
<svg><use xlink:href="#iconSearch"></use></svg>
</button>
<div style="position: relative" class="fn__flex">
- <input style="${showSearch ? "width:128px" : "width:0;padding-left: 0;padding-right: 0;"}" data-type="av-search" class="b3-text-field b3-text-field--text" placeholder="${window.siyuan.languages.search}">
+ <div contenteditable="true" style="${showSearch ? "width:128px" : "width:0;padding-left: 0;padding-right: 0;"}" data-type="av-search" class="b3-text-field b3-text-field--text" placeholder="${window.siyuan.languages.search}"></div>
</div>
<div class="fn__space"></div>
<span data-type="av-more" aria-label="${window.siyuan.languages.config}" data-position="8south" class="ariaLabel block__icon">