diff --git a/src/FileGrid.tsx b/src/FileGrid.tsx index 755031a..c48a8d0 100644 --- a/src/FileGrid.tsx +++ b/src/FileGrid.tsx @@ -49,24 +49,24 @@ function FileGrid({ {files.map((file) => ( { + onClick={() => { if (multiSelected !== null) { onMultiSelect(file.key); - event.preventDefault(); } else if (isDirectory(file)) { onCwdChange(file.key + "/"); - event.preventDefault(); - } + } else + window.open( + `/webdav/${encodeKey(file.key)}`, + "_blank", + "noopener,noreferrer" + ); }} onContextMenu={(e) => { e.preventDefault(); onMultiSelect(file.key); }} + sx={{ userSelect: "none" }} > {file.customMetadata?.thumbnail ? (