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')}