StepContent was a component defined inside Setup, so every state change recreated it as a new component type, causing React to unmount/remount it and snap focus back to autoFocus. Replaced with inline conditional JSX blocks.
StepContent was a component defined inside Setup, so every state change recreated it as a new component type, causing React to unmount/remount it and snap focus back to autoFocus. Replaced with inline conditional JSX blocks.