From c0653f1f994cdee5f15509fe7b2f0417dddbce1b Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Thu, 11 Dec 2025 20:35:52 +0200 Subject: [PATCH] fix Apple's Best Feature --- src/components/contacts/components/OTPInput.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/contacts/components/OTPInput.tsx b/src/components/contacts/components/OTPInput.tsx index 1ca791953a..da68bf8d5a 100644 --- a/src/components/contacts/components/OTPInput.tsx +++ b/src/components/contacts/components/OTPInput.tsx @@ -9,8 +9,8 @@ import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' import {mergeRefs} from '#/lib/merge-refs' -import {isIOS} from '#/platform/detection' -import {atoms as a, platform, useTheme} from '#/alf' +import {isAndroid, isIOS} from '#/platform/detection' +import {atoms as a, ios, platform, useTheme} from '#/alf' import {useInteractionState} from '#/components/hooks/useInteractionState' import {Text} from '#/components/Typography' @@ -93,6 +93,9 @@ export function OTPInput({ })} setTimeout(() => innerRef.current?.focus(), 100))} + autoFocus={isAndroid} accessible accessibilityLabel={label} accessibilityHint="" @@ -102,12 +105,13 @@ export function OTPInput({ onChangeText={onChangeText} onSelectionChange={onSelectionChange} keyboardAppearance={t.scheme} + inputMode="numeric" keyboardType="number-pad" + textContentType="oneTimeCode" autoComplete={platform({ android: 'sms-otp', ios: 'one-time-code', })} - autoFocus onFocus={onFocus} onBlur={onBlur} maxLength={numberOfDigits}