Set file selection on drag when necessary

- the behaviour was unexpected if another file was already open
This commit is contained in:
Mattias Granlund 2024-03-04 23:45:48 +01:00
parent e4fab86085
commit 5ad6db4e07

View File

@ -81,7 +81,7 @@
on:dragstart={() => {
// Reset selection if the file being dragged is not in the selected list
if ($selectedFiles.length > 0 && !$selectedFiles.find((f) => f.id == file.id)) {
$selectedFiles = [];
$selectedFiles = [file];
}
}}
use:draggable={{