fix: Prevent scroll when focusing
This commit is contained in:
@@ -43,7 +43,9 @@ const BoardMembershipsStep = React.memo(
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
searchField.current.focus();
|
||||
searchField.current.focus({
|
||||
preventScroll: true,
|
||||
});
|
||||
}, []);
|
||||
|
||||
return (
|
||||
|
||||
@@ -63,7 +63,9 @@ const AddStep = React.memo(({ onCreate, onClose }) => {
|
||||
}, [openStep]);
|
||||
|
||||
useEffect(() => {
|
||||
nameField.current.focus();
|
||||
nameField.current.focus({
|
||||
preventScroll: true,
|
||||
});
|
||||
}, []);
|
||||
|
||||
useDidUpdate(() => {
|
||||
|
||||
@@ -89,7 +89,9 @@ const LabelsStep = React.memo(
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
searchField.current.focus();
|
||||
searchField.current.focus({
|
||||
preventScroll: true,
|
||||
});
|
||||
}, []);
|
||||
|
||||
if (step) {
|
||||
|
||||
@@ -61,7 +61,9 @@ const AddStep = React.memo(
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
searchField.current.focus();
|
||||
searchField.current.focus({
|
||||
preventScroll: true,
|
||||
});
|
||||
}, []);
|
||||
|
||||
if (step) {
|
||||
|
||||
@@ -88,7 +88,9 @@ const UserAddStep = React.memo(
|
||||
}, [onCreate, data]);
|
||||
|
||||
useEffect(() => {
|
||||
emailField.current.focus();
|
||||
emailField.current.focus({
|
||||
preventScroll: true,
|
||||
});
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -90,7 +90,9 @@ const UserEmailEditStep = React.memo(
|
||||
}, [email, usePasswordConfirmation, onUpdate, onClose, data]);
|
||||
|
||||
useEffect(() => {
|
||||
emailField.current.focus();
|
||||
emailField.current.focus({
|
||||
preventScroll: true,
|
||||
});
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -71,7 +71,9 @@ const UserPasswordEditStep = React.memo(
|
||||
}, [usePasswordConfirmation, onUpdate, data]);
|
||||
|
||||
useEffect(() => {
|
||||
passwordField.current.focus();
|
||||
passwordField.current.focus({
|
||||
preventScroll: true,
|
||||
});
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -90,7 +90,9 @@ const UserUsernameEditStep = React.memo(
|
||||
}, [username, usePasswordConfirmation, onUpdate, onClose, data]);
|
||||
|
||||
useEffect(() => {
|
||||
usernameField.current.focus();
|
||||
usernameField.current.focus({
|
||||
preventScroll: true,
|
||||
});
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user