From a17f8bbcb6b9540cf9e46822bd39cff07dcfc19d Mon Sep 17 00:00:00 2001 From: Vanessa Date: Fri, 6 Feb 2026 10:37:54 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E7=A7=BB=E5=8A=A8=E7=AB=AF=E5=9D=97?= =?UTF-8?q?=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/protyle/ui/initUI.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/protyle/ui/initUI.ts b/app/src/protyle/ui/initUI.ts index 8964a294f..684c5afc2 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 => {