Auth Password: Select wrong password for easy editing (#1011)
This commit is contained in:
parent
41cb364b40
commit
38278e9548
@ -50,6 +50,15 @@ const PasswordForm: FC<OwnProps> = ({
|
|||||||
}
|
}
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (error) {
|
||||||
|
requestAnimationFrame(() => {
|
||||||
|
inputRef.current!.focus();
|
||||||
|
inputRef.current!.select();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}, [error]);
|
||||||
|
|
||||||
function onPasswordChange(e: ChangeEvent<HTMLInputElement>) {
|
function onPasswordChange(e: ChangeEvent<HTMLInputElement>) {
|
||||||
if (error) {
|
if (error) {
|
||||||
clearError();
|
clearError();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user