diff --git a/native/account/registration/keyserver-selection.react.js b/native/account/registration/keyserver-selection.react.js
--- a/native/account/registration/keyserver-selection.react.js
+++ b/native/account/registration/keyserver-selection.react.js
@@ -21,12 +21,23 @@
};
// eslint-disable-next-line no-unused-vars
function KeyserverSelection(props: Props): React.Node {
+ const [customKeyserver, setCustomKeyserver] = React.useState('');
+ const customKeyserverTextInputRef = React.useRef();
+
const [currentSelection, setCurrentSelection] = React.useState();
const selectAshoat = React.useCallback(() => {
setCurrentSelection('ashoat');
+ customKeyserverTextInputRef.current?.blur();
}, []);
+ const customKeyserverEmpty = !customKeyserver;
const selectCustom = React.useCallback(() => {
setCurrentSelection('custom');
+ if (customKeyserverEmpty) {
+ customKeyserverTextInputRef.current?.focus();
+ }
+ }, [customKeyserverEmpty]);
+ const onCustomKeyserverFocus = React.useCallback(() => {
+ setCurrentSelection('custom');
}, []);
const styles = useStyles(unboundStyles);
@@ -68,9 +79,13 @@
Enter a keyserver