From b419db3716cb28b4524666ea1e7e5c4f59fa6750 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vi=CC=81ctor=20Falco=CC=81n?= Date: Mon, 20 Jul 2026 18:06:18 +0200 Subject: [PATCH] fix(savings-goals): don't leave body pointer-events locked after create chooser Preventing default on the dropdown item's onSelect kept the Radix menu open behind the dialog, leaving `pointer-events: none` on after the dialog closed. Let the menu close normally and only defer the dialog open to the next frame. --- resources/js/pages/budgets/index.tsx | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/resources/js/pages/budgets/index.tsx b/resources/js/pages/budgets/index.tsx index 86e6738e..bb4a86ba 100644 --- a/resources/js/pages/budgets/index.tsx +++ b/resources/js/pages/budgets/index.tsx @@ -67,25 +67,25 @@ export default function BudgetsIndex({ - {/* Defer opening until the menu has closed so Radix - doesn't leave pointer-events locked on the body. */} + {/* Let the menu close itself (no preventDefault, or + it leaves pointer-events locked on the body), and + defer opening the dialog to the next frame so it + doesn't race the menu's close. */} { - e.preventDefault(); + onSelect={() => requestAnimationFrame(() => setCreateType('budget'), - ); - }} + ) + } > {__('Budget')} { - e.preventDefault(); + onSelect={() => requestAnimationFrame(() => setCreateType('goal'), - ); - }} + ) + } > {__('Savings Goal')}