mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-26 17:04:07 +01:00
🎨 Improve soft keyboard toolbar pop-up https://github.com/siyuan-note/siyuan/issues/16548
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
de1a209e58
commit
4326958da2
2 changed files with 2 additions and 9 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue