diff --git a/ios/EnrichedTextInputView.mm b/ios/EnrichedTextInputView.mm index b38d56f54..3e138bff8 100644 --- a/ios/EnrichedTextInputView.mm +++ b/ios/EnrichedTextInputView.mm @@ -835,18 +835,20 @@ - (void)updateProps:(Props::Shared const &)props } } - // autoCorrect - if (newViewProps.autoCorrect != oldViewProps.autoCorrect) { - textView.autocorrectionType = newViewProps.autoCorrect - ? UITextAutocorrectionTypeYes - : UITextAutocorrectionTypeNo; - } - - // spellCheck - if (newViewProps.spellCheck != oldViewProps.spellCheck) { - textView.spellCheckingType = newViewProps.spellCheck - ? UITextSpellCheckingTypeYes - : UITextSpellCheckingTypeNo; + // Codegen's false defaults can match the initial props while UITextView + // still uses its system defaults. Synchronize the native state before focus. + UITextAutocorrectionType autocorrectionType = + newViewProps.autoCorrect ? UITextAutocorrectionTypeYes + : UITextAutocorrectionTypeNo; + if (textView.autocorrectionType != autocorrectionType) { + textView.autocorrectionType = autocorrectionType; + } + + UITextSpellCheckingType spellCheckingType = + newViewProps.spellCheck ? UITextSpellCheckingTypeYes + : UITextSpellCheckingTypeNo; + if (textView.spellCheckingType != spellCheckingType) { + textView.spellCheckingType = spellCheckingType; } // isOnChangeHtmlSet