From 152f8302f7cda21bde37692b175c22c124233f45 Mon Sep 17 00:00:00 2001 From: Ariel Leyva Date: Sun, 7 Dec 2025 01:35:47 -0500 Subject: [PATCH] fix: prevent the right-click from selecting multiple items when the "single-click" option is active (#5608) --- frontend/src/components/files/ListingItem.vue | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/files/ListingItem.vue b/frontend/src/components/files/ListingItem.vue index 5db88aba..d75c2f98 100644 --- a/frontend/src/components/files/ListingItem.vue +++ b/frontend/src/components/files/ListingItem.vue @@ -265,7 +265,15 @@ const click = (event: Event | KeyboardEvent) => { } if (fileStore.selected.indexOf(props.index) !== -1) { - fileStore.removeSelected(props.index); + if ( + (event as KeyboardEvent).ctrlKey || + (event as KeyboardEvent).metaKey || + fileStore.multiple + ) { + fileStore.removeSelected(props.index); + } else { + fileStore.selected = [props.index]; + } return; } @@ -291,7 +299,6 @@ const click = (event: Event | KeyboardEvent) => { } if ( - !singleClick.value && !(event as KeyboardEvent).ctrlKey && !(event as KeyboardEvent).metaKey && !fileStore.multiple