mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-24 02:20:13 +01:00
This commit is contained in:
parent
ba8d07b3d0
commit
5b669b6091
3 changed files with 18 additions and 2 deletions
|
|
@ -16,6 +16,7 @@ import {confirmDialog} from "../../dialog/confirmDialog";
|
|||
import {updateHotkeyTip} from "../../protyle/util/compatibility";
|
||||
import {openFileById} from "../../editor/util";
|
||||
import {hasClosestByTag, hasTopClosestByTag} from "../../protyle/util/hasClosest";
|
||||
import {isTouchDevice} from "../../util/functions";
|
||||
|
||||
export class Files extends Model {
|
||||
public element: HTMLElement;
|
||||
|
|
@ -268,6 +269,11 @@ export class Files extends Model {
|
|||
// b3-list-item--focus 样式会遮挡拖拽排序的上下线条
|
||||
let focusElement: HTMLElement;
|
||||
this.element.addEventListener("dragstart", (event: DragEvent & { target: HTMLElement }) => {
|
||||
if (isTouchDevice()) {
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
return;
|
||||
}
|
||||
window.getSelection().removeAllRanges();
|
||||
focusElement = this.element.querySelector(".b3-list-item--focus");
|
||||
if (focusElement) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue