From 1e0d0a6f5393a8693d0169b51b347d3ea0673852 Mon Sep 17 00:00:00 2001 From: myxmaster Date: Tue, 24 Dec 2024 11:08:19 +0100 Subject: [PATCH] auto focus new password input --- views/Settings/SetPassword.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/views/Settings/SetPassword.tsx b/views/Settings/SetPassword.tsx index 368197d6a..856a687ae 100644 --- a/views/Settings/SetPassword.tsx +++ b/views/Settings/SetPassword.tsx @@ -48,6 +48,8 @@ export default class SetPassphrase extends React.Component< isBiometryEnabled: false }; + private firstInput = React.createRef(); + async componentDidMount() { const { SettingsStore } = this.props; const settings = await SettingsStore.getSettings(); @@ -58,6 +60,8 @@ export default class SetPassphrase extends React.Component< if (settings.passphrase) { this.setState({ savedPassphrase: settings.passphrase }); } + + this.firstInput.current?.focus(); } renderSeparator = () => ( @@ -176,6 +180,7 @@ export default class SetPassphrase extends React.Component< {localeString('views.Settings.newPassword')}