Vanessa 2026-02-04 16:38:23 +08:00
parent 24e3c88c59
commit 2b459bc269
2 changed files with 6 additions and 1 deletions

View file

@ -320,7 +320,6 @@ const renderKeyboardToolbar = () => {
if (getSelection().rangeCount === 0 ||
window.siyuan.config.readonly ||
document.getElementById("toolbarName").getAttribute("readonly") === "readonly" ||
window.screen.height - window.innerHeight < 160 || // reloadSync 会导致 selectionchange从而导致键盘没有弹起的情况下出现工具栏
!document.activeElement || (
document.activeElement &&
!["INPUT", "TEXTAREA"].includes(document.activeElement.tagName) &&

View file

@ -5,9 +5,15 @@ import {renderBacklink} from "../wysiwyg/renderBacklink";
import {hasClosestByClassName} from "./hasClosest";
import {preventScroll} from "../scroll/preventScroll";
import {isSupportCSSHL, searchMarkRender} from "../render/searchMarkRender";
/// #if MOBILE
import {hideKeyboardToolbar} from "../../mobile/util/keyboardToolbar";
/// #endif
import {restoreLuteMarkdownSyntax} from "./paste";
export const reloadProtyle = (protyle: IProtyle, focus: boolean, updateReadonly?: boolean) => {
/// #if MOBILE
hideKeyboardToolbar();
/// #endif
if (!protyle.preview.element.classList.contains("fn__none")) {
protyle.preview.render(protyle);
removeLoading(protyle);