fix: prevent auto-scroll to Skill Finder on page load

- Remove auto-focus on initial page load
- Only focus input after user interaction (SUCCESS state)
- Use preventScroll option to avoid scroll jumps
This commit is contained in:
Rohit Ghumare
2026-01-26 20:51:22 +00:00
parent 6d01413a68
commit 15134cebbb
+3 -2
View File
@@ -187,9 +187,10 @@ export function SkillGenerator(): React.ReactElement {
}
}
// Focus input only after user interaction, not on initial page load
useEffect(() => {
if (status === LoadingState.IDLE && inputRef.current) {
inputRef.current.focus();
if (status === LoadingState.SUCCESS && inputRef.current) {
inputRef.current.focus({ preventScroll: true });
}
}, [status]);