aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/DragManager.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2022-05-17 10:18:45 -0400
committerbobzel <zzzman@gmail.com>2022-05-17 10:18:45 -0400
commitee1fa0ad22f1643888e4c467c6f8df837cc69178 (patch)
treeefe48ceea402cc1e2c28d472b326e9e4cf955984 /src/client/util/DragManager.ts
parent09c7ee4120f48e212f9b64fd3e307c8ce49e0cfd (diff)
fixed pointerevents on treview open icon. added browse mode for freeformcollections
Diffstat (limited to 'src/client/util/DragManager.ts')
-rw-r--r--src/client/util/DragManager.ts24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/client/util/DragManager.ts b/src/client/util/DragManager.ts
index 037da132b..5a00e0c04 100644
--- a/src/client/util/DragManager.ts
+++ b/src/client/util/DragManager.ts
@@ -456,17 +456,19 @@ export namespace DragManager {
dragData.userDropAction = e.ctrlKey && e.altKey ? "copy" : e.ctrlKey ? "alias" : dragData.defaultDropAction;
}
if (((e.target as any)?.className === "lm_tabs" || e?.shiftKey) && dragData.draggedDocuments.length === 1) {
- if (!startWindowDragTimer) startWindowDragTimer = setTimeout(async () => {
- startWindowDragTimer = undefined;
- dragData.dropAction = dragData.userDropAction || "same";
- AbortDrag();
- await finishDrag?.(new DragCompleteEvent(true, dragData));
- DragManager.StartWindowDrag?.(e, dragData.droppedDocuments, (aborted) => {
- if (!aborted && (dragData.dropAction === "move" || dragData.dropAction === "same")) {
- dragData.removeDocument?.(dragData.draggedDocuments[0]);
- }
- });
- }, 500);
+ if (!startWindowDragTimer) {
+ startWindowDragTimer = setTimeout(async () => {
+ startWindowDragTimer = undefined;
+ dragData.dropAction = dragData.userDropAction || "same";
+ AbortDrag();
+ await finishDrag?.(new DragCompleteEvent(true, dragData));
+ DragManager.StartWindowDrag?.(e, dragData.droppedDocuments, (aborted) => {
+ if (!aborted && (dragData.dropAction === "move" || dragData.dropAction === "same")) {
+ dragData.removeDocument?.(dragData.draggedDocuments[0]);
+ }
+ });
+ }, 500);
+ }
} else {
clearTimeout(startWindowDragTimer);
startWindowDragTimer = undefined;