From c2ffbb65aaa2ec97a3654582672f53cf16f4ab59 Mon Sep 17 00:00:00 2001 From: MickaelK Date: Mon, 9 Mar 2026 11:13:07 +1100 Subject: [PATCH] fix (frontend): edge case for moving via drag and drop --- public/assets/pages/filespage/thing.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/assets/pages/filespage/thing.js b/public/assets/pages/filespage/thing.js index 2414b105..7d3be7eb 100644 --- a/public/assets/pages/filespage/thing.js +++ b/public/assets/pages/filespage/thing.js @@ -6,7 +6,7 @@ import { get as getConfig } from "../../model/config.js"; import { extractPath, isDir, isNativeFileUpload } from "./helper.js"; import { files$ } from "./ctrl_filesystem.js"; -import { addSelection, isSelected, clearSelection } from "./state_selection.js"; +import { addSelection, isSelected, clearSelection, expandSelection } from "./state_selection.js"; import { mv as mv$ } from "./model_files.js"; import { mv as mvVL, withVirtualLayer } from "./model_virtual_layer.js"; @@ -171,6 +171,7 @@ export function createThing({ }); }; $thing.ondragstart = (e) => { + if (expandSelection().length > 0) return e.preventDefault(); clearSelection(); $thing.classList.add("hover"); $checkbox.style.display = "none";