Skip to content

Commit

Permalink
Merge pull request #30620 from tienifr/fix/30281
Browse files Browse the repository at this point in the history
Fix: Keyboard does not open in 2FA page when returning from recovery code
  • Loading branch information
bondydaa authored Nov 10, 2023
2 parents bd9ab87 + dbd0c92 commit cf01854
Showing 1 changed file with 5 additions and 0 deletions.
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

0 comments on commit cf01854

Please sign in to comment.