mirror of
https://github.com/filebrowser/filebrowser.git
synced 2025-12-29 23:00:58 +00:00
fix: prevent the right-click from selecting multiple items when the "single-click" option is active (#5608)
This commit is contained in:
parent
4cbb4b73af
commit
152f8302f7
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user