diff --git a/src/components/Global/AmountInput/index.tsx b/src/components/Global/AmountInput/index.tsx index d2f256fbe..d3bcf3788 100644 --- a/src/components/Global/AmountInput/index.tsx +++ b/src/components/Global/AmountInput/index.tsx @@ -216,6 +216,14 @@ const AmountInput = ({ } }, [displayValue]) + // Autofocus the amount field on mount (desktop only). Done explicitly via the + // ref instead of React's `autoFocus` prop, which only fires at the exact moment + // of mount and silently no-ops when the input mounts after a client-side + // navigation/step transition (the add-money amount screen regressed this way). + useEffect(() => { + if (shouldAutoFocus) inputRef.current?.focus() + }, [shouldAutoFocus]) + return (