feat: enable copy operation on drag‑and‑drop with ctrl key (#5882)

This commit is contained in:
Ariel Leyva
2026-04-04 09:54:19 +02:00
committed by GitHub
parent 2f805de527
commit 876cdb3426
@@ -194,8 +194,11 @@ const drop = async (event: Event) => {
const baseItems = (await api.fetch(path)).items;
const action = (overwrite?: boolean, rename?: boolean) => {
api
.move(items, overwrite, rename)
const action =
(event as KeyboardEvent).ctrlKey || (event as KeyboardEvent).metaKey
? api.copy
: api.move;
action(items, overwrite, rename)
.then(() => {
fileStore.reload = true;
})