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