From ab0aa8ec8d1e06830e461f16d732280e156ec0ca Mon Sep 17 00:00:00 2001 From: Dave Date: Fri, 28 Aug 2026 00:26:24 +0200 Subject: [PATCH] fix(boss-dashboard): close sheet on backdrop click + tab switch --- src/app/(mobile)/m/dashboard-view.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/app/(mobile)/m/dashboard-view.tsx b/src/app/(mobile)/m/dashboard-view.tsx index 6d17e43..2522bb2 100644 --- a/src/app/(mobile)/m/dashboard-view.tsx +++ b/src/app/(mobile)/m/dashboard-view.tsx @@ -71,6 +71,7 @@ export default function BossDashboardView() { useEffect(() => { void fetchData(); + closeSheet(); // also closes the sheet so we don't show stale window data }, [fetchData]); // Realtime subscription (added in Task 14). @@ -303,8 +304,17 @@ export default function BossDashboardView() { {/* Rep-activity bottom sheet */} setSheetRep(null)} + onClick={(e) => { + // Close on backdrop click. Native dispatches click events + // on the dialog element itself when the user taps the backdrop; + // clicks on the inner content have the inner
as their target. + if (e.target === dialogRef.current) { + closeSheet(); + } + }} > {sheetRep && (