Skip to content

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

:art: 移动端块标

Vanessaa17f8bbcb6b9
diff --git a/app/src/protyle/ui/initUI.ts b/app/src/protyle/ui/initUI.ts
index 8964a294ff..684c5afc29 100644
--- a/app/src/protyle/ui/initUI.ts
+++ b/app/src/protyle/ui/initUI.ts
@@ -184,7 +184,8 @@ export const initUI = (protyle: IProtyle) => {
});
});
let overAttr = false;
- protyle.element.addEventListener(isTouchDevice() ? "touchend" : "mouseover", (event: KeyboardEvent & {
+ const isTouch = isTouchDevice();
+ protyle.element.addEventListener(isTouch ? "touchend" : "mouseover", (event: KeyboardEvent & {
target: HTMLElement
}) => {
// attr
@@ -222,7 +223,7 @@ export const initUI = (protyle: IProtyle) => {
// gutter
const buttonElement = hasClosestByTag(event.target, "BUTTON");
- if (buttonElement && buttonElement.parentElement.classList.contains("protyle-gutters")) {
+ if (!isTouch && buttonElement && buttonElement.parentElement.classList.contains("protyle-gutters")) {
const type = buttonElement.getAttribute("data-type");
if (type === "fold" || type === "NodeAttributeViewRow") {
Array.from(protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--hl, .av__row--hl")).forEach(item => {