Skip to content

Commit

Permalink
Fix iOS attempted to auto-correct and capitalize email
Browse files Browse the repository at this point in the history
- And add autoComplete email hint for android
- https://reactnative.dev/docs/textinput#autocomplete
  • Loading branch information
High5Apps committed Sep 27, 2024
1 parent 8e3c93d commit f73cacf
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/screens/onboarding/NewOrg/NewOrgScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ export default function NewOrgScreen({ navigation, route }: NewOrgScreenProps) {

const TextInput = messageMultiline ? MultilineTextInput : TextInputRow;

const isEmail = paramType === 'email';

return (
<KeyboardAvoidingScreenBackground topNavigationBarHidden>
<LearnMoreModal
Expand All @@ -85,9 +87,12 @@ export default function NewOrgScreen({ navigation, route }: NewOrgScreenProps) {
</Text>
<HeaderText style={styles.headerText}>{header}</HeaderText>
<TextInput
autoCapitalize={isEmail ? 'none' : 'sentences'}
autoComplete={isEmail ? 'email' : 'off'}
autoCorrect={!isEmail}
autoFocus={false}
blurOnSubmit={false}
keyboardType={paramType === 'email' ? 'email-address' : 'default'}
keyboardType={isEmail ? 'email-address' : 'default'}
maxLength={maxLength}
onChangeText={setInput}
onSubmitEditing={() => {
Expand Down

0 comments on commit f73cacf

Please sign in to comment.