fix: Prevent scroll when focusing

This commit is contained in:
Maksim Eltyshev
2022-12-26 22:51:17 +01:00
parent 0ad9cffb08
commit 26f464eb25
10 changed files with 31 additions and 14 deletions

View File

@@ -90,7 +90,9 @@ const UserUsernameEditStep = React.memo(
}, [username, usePasswordConfirmation, onUpdate, onClose, data]);
useEffect(() => {
usernameField.current.focus();
usernameField.current.focus({
preventScroll: true,
});
}, []);
useEffect(() => {