mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-03 15:28:49 +01:00
This commit is contained in:
parent
76e72a31a8
commit
e4a37aeacc
1 changed files with 5 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue