From 208535a8cc23254de0013dfab9008486707ee6c2 Mon Sep 17 00:00:00 2001 From: Ariel Leyva Date: Sat, 10 Jan 2026 04:05:12 -0500 Subject: [PATCH] fix: clear selection by clicking on empty area (#5663) --- frontend/src/views/files/FileListing.vue | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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 = []; +}; +