diff --git a/web/modals/threads/thread-settings-delete-tab.react.js b/web/modals/threads/thread-settings-delete-tab.react.js --- a/web/modals/threads/thread-settings-delete-tab.react.js +++ b/web/modals/threads/thread-settings-delete-tab.react.js @@ -42,6 +42,8 @@ const dispatchActionPromise = useDispatchActionPromise(); const callDeleteThread = useServerCall(deleteThread); + const accountPasswordInputRef = React.useRef(); + const deleteThreadAction = React.useCallback(async () => { try { const response = await callDeleteThread(threadInfo.id, accountPassword); @@ -54,8 +56,7 @@ : 'unknown error', ); setAccountPassword(''); - // TODO: accountPasswordInput.focus() - // (once ref is moved up to functional component) + accountPasswordInputRef.current?.focus(); throw e; } }, [ @@ -95,6 +96,7 @@ value={accountPassword} onChange={onChangeAccountPassword} disabled={inputDisabled} + ref={accountPasswordInputRef} />