Vanessa 2026-02-12 23:39:59 +08:00
parent cf3a40e494
commit 96bc21093a
2 changed files with 5 additions and 2 deletions

View file

@ -2,7 +2,7 @@
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, height=device-height, interactive-widget=resizes-content, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, viewport-fit=cover">
<meta name="viewport" content="width=device-width, height=device-height, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, viewport-fit=cover">
<link rel="manifest" href="/manifest.webmanifest" crossorigin="use-credentials">
</head>
<body class="fn__flex-column">

View file

@ -15,7 +15,7 @@ import {bootSync} from "../dialog/processSystem";
import {initMessage, showMessage} from "../dialog/message";
import {goBack} from "./util/MobileBackFoward";
import {activeBlur, hideKeyboardToolbar, showKeyboardToolbar} from "./util/keyboardToolbar";
import {getLocalStorage, writeText} from "../protyle/util/compatibility";
import {getLocalStorage, isChromeBrowser, writeText} from "../protyle/util/compatibility";
import {getCurrentEditor, openMobileFileById} from "./editor";
import {getSearch} from "../util/functions";
import {checkPublishServiceClosed} from "../util/processMessage";
@ -76,6 +76,9 @@ class App {
}
})
};
if (isChromeBrowser()) {
document.querySelector('meta[name="viewport"]').setAttribute("content", "width=device-width, height=device-height, interactive-widget=resizes-content, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, viewport-fit=cover");
}
// 不能使用 touchstart否则会被 event.stopImmediatePropagation() 阻塞
window.addEventListener("click", (event: MouseEvent & { target: HTMLElement }) => {
if (!window.siyuan.menus.menu.element.contains(event.target) && !hasClosestByAttribute(event.target, "data-menu", "true")) {