diff --git a/frontend/src/views/files/FileListing.vue b/frontend/src/views/files/FileListing.vue index 409c78aa..62a6819f 100644 --- a/frontend/src/views/files/FileListing.vue +++ b/frontend/src/views/files/FileListing.vue @@ -159,6 +159,7 @@ ref="listing" class="file-icons" :class="authStore.user?.viewMode ?? ''" + @click="handleEmptyAreaClick" >
@@ -1051,4 +1052,18 @@ const showContextMenu = (event: MouseEvent) => { const hideContextMenu = () => { isContextMenuVisible.value = false; }; + +const handleEmptyAreaClick = (e: MouseEvent) => { + const target = e.target; + if (!(target instanceof HTMLElement)) return; + + if (target.closest("item") || target.closest(".item")) return; + + fileStore.selected = []; +}; +