fix: prevent the right-click from selecting multiple items when the "single-click" option is active

This commit is contained in:
ArielLeyva 2025-12-06 07:12:07 -05:00
parent 58cc874828
commit b0d2015b01

View File

@ -265,7 +265,15 @@ const click = (event: Event | KeyboardEvent) => {
}
if (fileStore.selected.indexOf(props.index) !== -1) {
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