Page MenuHomePhorge

D3838.1768841071.diff
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

D3838.1768841071.diff

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}
/>
</div>
</div>

File Metadata

Mime Type
text/plain
Expires
Mon, Jan 19, 4:44 PM (4 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5957300
Default Alt Text
D3838.1768841071.diff (1 KB)

Event Timeline