diff --git a/packages/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm b/packages/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm index e042d4868a0f..c2b39c8b1f55 100644 --- a/packages/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm +++ b/packages/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm @@ -208,6 +208,8 @@ - (void)updateProps:(const Props::Shared &)props oldProps:(const Props::Shared & const auto &newTextInputProps = static_cast(*props); // Traits: + BOOL needsReloadInputViews = NO; + if (newTextInputProps.multiline != oldTextInputProps.multiline) { [self _setMultiline:newTextInputProps.multiline]; } @@ -215,11 +217,13 @@ - (void)updateProps:(const Props::Shared &)props oldProps:(const Props::Shared & if (newTextInputProps.traits.autocapitalizationType != oldTextInputProps.traits.autocapitalizationType) { _backedTextInputView.autocapitalizationType = RCTUITextAutocapitalizationTypeFromAutocapitalizationType(newTextInputProps.traits.autocapitalizationType); + needsReloadInputViews = YES; } if (newTextInputProps.traits.autoCorrect != oldTextInputProps.traits.autoCorrect) { _backedTextInputView.autocorrectionType = RCTUITextAutocorrectionTypeFromOptionalBool(newTextInputProps.traits.autoCorrect); + needsReloadInputViews = YES; } if (newTextInputProps.traits.contextMenuHidden != oldTextInputProps.traits.contextMenuHidden) { @@ -251,6 +255,14 @@ - (void)updateProps:(const Props::Shared &)props oldProps:(const Props::Shared & if (newTextInputProps.traits.spellCheck != oldTextInputProps.traits.spellCheck) { _backedTextInputView.spellCheckingType = RCTUITextSpellCheckingTypeFromOptionalBool(newTextInputProps.traits.spellCheck); + needsReloadInputViews = YES; + } + + // Without the call to reloadInputViews, a change to the capitalization, autocorrection or spell checking of the + // focused field (the first responder) doesn't reach the keyboard until the field loses and regains focus. One + // reload covers all three when they change together. + if (needsReloadInputViews && _backedTextInputView.isFirstResponder) { + [_backedTextInputView reloadInputViews]; } if (newTextInputProps.traits.caretHidden != oldTextInputProps.traits.caretHidden) {