Vanessa 2026-02-05 14:31:36 +08:00
parent b14eec5c59
commit 6207421d47

View file

@ -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;
}
}