From 6207421d47c9813f87d395cf20e85c685ccc91a3 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Thu, 5 Feb 2026 14:31:36 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/13915 --- app/src/mobile/util/touch.ts | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/app/src/mobile/util/touch.ts b/app/src/mobile/util/touch.ts index 0ec40a44e..f3b873f33 100644 --- a/app/src/mobile/util/touch.ts +++ b/app/src/mobile/util/touch.ts @@ -233,12 +233,18 @@ export const handleTouchMove = (event: TouchEvent) => { return; } if (sideMaskElement.classList.contains("fn__none")) { - let scrollElement = hasClosestByAttribute(target, "data-type", "NodeCodeBlock") || - hasClosestByAttribute(target, "data-type", "NodeAttributeView") || - hasClosestByAttribute(target, "data-type", "NodeMathBlock") || - hasClosestByAttribute(target, "data-type", "NodeTable") || - hasTopClosestByClassName(target, "list") || - hasTopClosestByClassName(target, "protyle-breadcrumb__bar--nowrap"); + let scrollElement = hasClosestByAttribute(target, "data-type", "NodeCodeBlock"); + if (event.touches.length > 1 || (scrollElement && !scrollElement.classList.contains("code-block"))) { + scrollBlock = true; + return; + } + if (!scrollElement) { + scrollElement = hasClosestByAttribute(target, "data-type", "NodeAttributeView") || + hasClosestByAttribute(target, "data-type", "NodeMathBlock") || + hasClosestByAttribute(target, "data-type", "NodeTable") || + hasTopClosestByClassName(target, "list") || + hasTopClosestByClassName(target, "protyle-breadcrumb__bar--nowrap"); + } if (scrollElement) { if (scrollElement.classList.contains("table")) { scrollElement = scrollElement.firstElementChild as HTMLElement; @@ -274,7 +280,7 @@ export const handleTouchMove = (event: TouchEvent) => { return; } } - if (scrollBlock || event.touches.length > 1) { + if (scrollBlock) { return; } }