Skip to content

Sync-in · Sovereign platform for file storage, sharing, synchronization, and collaboration.

feat(frontend:spaces): enable keyboard navigation when files are selected in list mode

johaven7e38ce29fbfe
diff --git a/frontend/src/app/applications/spaces/components/spaces-browser.component.ts b/frontend/src/app/applications/spaces/components/spaces-browser.component.ts
index 33ef9765..ed28b356 100644
--- a/frontend/src/app/applications/spaces/components/spaces-browser.component.ts
+++ b/frontend/src/app/applications/spaces/components/spaces-browser.component.ts
@@ -748,6 +748,7 @@ export class SpacesBrowserComponent implements OnInit, AfterViewInit, OnDestroy
}
private modifySelection(file: FileModel) {
+ if (!file) return
if (file.isSelected) {
this.updateSelection(this.selection.filter((f) => f.id !== file.id))
} else {
@@ -892,6 +893,8 @@ export class SpacesBrowserComponent implements OnInit, AfterViewInit, OnDestroy
let code = ev.keyCode || ev.which
if ([37, 38, 39, 40].indexOf(code) === -1) {
return
+ } else if ((code === 37 || code === 39) && !this.galleryMode.enabled) {
+ return
}
ev.preventDefault()
ev.stopPropagation()