From e4a37aeaccea4acc0abaffa72d58c8c0160120bb Mon Sep 17 00:00:00 2001 From: Vanessa Date: Tue, 30 May 2023 23:56:46 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/8402 --- app/src/mobile/util/touch.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/src/mobile/util/touch.ts b/app/src/mobile/util/touch.ts index d2efa5a5c..b35b1deb3 100644 --- a/app/src/mobile/util/touch.ts +++ b/app/src/mobile/util/touch.ts @@ -1,4 +1,4 @@ -import {hasClosestByAttribute, hasClosestByClassName} from "../../protyle/util/hasClosest"; +import {hasClosestByAttribute, hasClosestByClassName, hasTopClosestByClassName} from "../../protyle/util/hasClosest"; import {closePanel} from "./closePanel"; import {popMenu} from "../menu"; import {activeBlur, hideKeyboardToolbar} from "./keyboardToolbar"; @@ -75,7 +75,8 @@ export const handleTouchEnd = (app: App, event: TouchEvent) => { // 有些事件不经过 touchmove let scrollElement = hasClosestByAttribute(target, "data-type", "NodeCodeBlock") || - hasClosestByAttribute(target, "data-type", "NodeTable"); + hasClosestByAttribute(target, "data-type", "NodeTable") || + hasTopClosestByClassName(target, "list"); if (scrollElement) { if (scrollElement.classList.contains("table")) { scrollElement = scrollElement.firstElementChild as HTMLElement; @@ -223,7 +224,8 @@ export const handleTouchMove = (event: TouchEvent) => { previousClientX = event.touches[0].clientX; if (Math.abs(xDiff) > Math.abs(yDiff)) { let scrollElement = hasClosestByAttribute(target, "data-type", "NodeCodeBlock") || - hasClosestByAttribute(target, "data-type", "NodeTable"); + hasClosestByAttribute(target, "data-type", "NodeTable") || + hasTopClosestByClassName(target, "list"); if (scrollElement) { if (scrollElement.classList.contains("table")) { scrollElement = scrollElement.firstElementChild as HTMLElement;