Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Keyboard does not open in 2FA page when returning from recovery code #30620

Merged
merged 10 commits into from
Nov 10, 2023
5 changes: 5 additions & 0 deletions src/components/MagicCodeInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ const propTypes = {
/** Should the input auto focus */
autoFocus: PropTypes.bool,

/** Whether we should wait before focusing the TextInput, useful when using transitions */
shouldDelayFocus: PropTypes.bool,

/** Error text to display */
errorText: PropTypes.string,

Expand Down Expand Up @@ -60,6 +63,7 @@ const defaultProps = {
value: '',
name: '',
autoFocus: true,
shouldDelayFocus: false,
errorText: '',
shouldSubmitOnComplete: true,
innerRef: null,
Expand Down Expand Up @@ -312,6 +316,7 @@ function MagicCodeInput(props) {
}}
disableKeyboard={props.isDisableKeyboard}
autoFocus={index === 0 && props.autoFocus}
shouldDelayFocus={index === 0 && props.shouldDelayFocus}
inputMode={props.isDisableKeyboard ? 'none' : 'numeric'}
textContentType="oneTimeCode"
name={props.name}
Expand Down
Loading