Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2026-02-04 13:45:37 +08:00
parent de1a209e58
commit 4326958da2
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 2 additions and 9 deletions

View file

@ -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;

View file

@ -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">