mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-07-03 14:09:06 +02:00
This commit is contained in:
@@ -747,6 +747,7 @@
|
||||
border-radius: 50%;
|
||||
box-sizing: border-box;
|
||||
cursor: ns-resize;
|
||||
touch-action: none;
|
||||
}
|
||||
|
||||
&__celltext {
|
||||
@@ -816,6 +817,7 @@
|
||||
right: -2.5px;
|
||||
transition: var(--b3-background-transition);
|
||||
z-index: 1;
|
||||
touch-action: none;
|
||||
|
||||
&:hover {
|
||||
background-color: var(--b3-theme-primary);
|
||||
|
||||
@@ -402,10 +402,3 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Touch drag support for dialog and editor resize handles */
|
||||
[class*="resize__"],
|
||||
.av__widthdrag,
|
||||
.av__drag-fill {
|
||||
touch-action: none;
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
&__t,
|
||||
&__d {
|
||||
position: absolute;
|
||||
touch-action: none;
|
||||
}
|
||||
|
||||
&__rd {
|
||||
|
||||
@@ -53,7 +53,7 @@ const scrollAnimation = (timestamp: number) => {
|
||||
dragoverScroll.lastTime = timestamp;
|
||||
};
|
||||
|
||||
export const dragOverScroll = (moveEvent: MouseEvent | { clientY: number }, contentRect: DOMRect, element: Element) => {
|
||||
export const dragOverScroll = (moveEvent: MouseEvent, contentRect: DOMRect, element: Element) => {
|
||||
const dragToUp = moveEvent.clientY < contentRect.top + Constants.SIZE_SCROLL_TB;
|
||||
if (dragToUp ||
|
||||
moveEvent.clientY > contentRect.bottom - Constants.SIZE_SCROLL_TB) {
|
||||
|
||||
@@ -150,7 +150,12 @@ export const initWindowEvent = (app: App) => {
|
||||
// 触摸屏背景和嵌入块按钮显示
|
||||
globalTouchStart(event);
|
||||
}, false);
|
||||
|
||||
document.addEventListener("touchend", (event) => {
|
||||
if (window.siyuan.touchDragActive) {
|
||||
return;
|
||||
}
|
||||
// pad 端长按事件
|
||||
if (isIPad()) {
|
||||
// https://github.com/siyuan-note/siyuan/issues/9113
|
||||
if (globalTouchEnd(event, undefined, time, app)) {
|
||||
@@ -158,9 +163,6 @@ export const initWindowEvent = (app: App) => {
|
||||
event.preventDefault();
|
||||
return;
|
||||
}
|
||||
if (window.siyuan.touchDragActive) {
|
||||
return;
|
||||
}
|
||||
if (new Date().getTime() - time <= 900) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -20,8 +20,7 @@ import {getAllEditor} from "../../layout/getAll";
|
||||
import {updatePanelByEditor} from "../../editor/util";
|
||||
/// #endif
|
||||
import {blockRender} from "../render/blockRender";
|
||||
/// #else
|
||||
import {uploadFiles, uploadLocalFiles} from "../upload";
|
||||
import {uploadLocalFiles} from "../upload";
|
||||
import {insertHTML} from "./insertHTML";
|
||||
import {isBrowser} from "../../util/functions";
|
||||
import {hideElements} from "../ui/hideElements";
|
||||
@@ -31,6 +30,8 @@ import {setFold, zoomOut} from "../../menus/protyle";
|
||||
/// #if !BROWSER
|
||||
import {webUtils} from "electron";
|
||||
import {dragUpload} from "../render/av/asset";
|
||||
/// #else
|
||||
import {uploadFiles} from "../upload";
|
||||
/// #endif
|
||||
import {addDragFill, getTypeByCellElement} from "../render/av/cell";
|
||||
import {processClonePHElement} from "../render/util";
|
||||
|
||||
Reference in New Issue
Block a user