diff --git a/js/app.js b/js/app.js index 597954b..c8e32cb 100644 --- a/js/app.js +++ b/js/app.js @@ -1141,6 +1141,13 @@ if (token && curUser) { } })(); +// Click outside any entry card → clear selection +document.addEventListener('mousedown', function(e) { + if (e.button !== 0 || rectState.active) return; + if (e.target?.closest?.('.entry-card,.entry-row,.entry-compact,.table-row-drag,#batchBar,.custom-modal-overlay.show,.edit-modal.show,.modal-overlay.show,#genModal,#settingsMenu')) return; + if (selectedIds.size > 0) clearSelection(); +}); + // Rectangle selection document.getElementById('entriesContainer').addEventListener('mousedown', function(e) { if (rectState.active || e.button !== 0) return;