From 5c63f91a88862a810602ff1c2b98eebee7a3a271 Mon Sep 17 00:00:00 2001 From: Noah Dorfman <32619955+NoahDorfman00@users.noreply.github.com> Date: Sat, 8 Aug 2026 14:18:53 -0400 Subject: [PATCH] iOS: reload input views when keyboardType or returnKeyType change on a focused TextInput The legacy architecture reloads the focused field's input views when its keyboardType changes (RCTBaseTextInputView), so the keyboard updates immediately. The Fabric component sets the trait but never reloads, so the keyboard does not change until the field loses and regains focus. Restore parity by calling reloadInputViews when the field is first responder, for both keyboardType and returnKeyType. --- .../ComponentViews/TextInput/RCTTextInputComponentView.mm | 8 ++++++++ 1 file changed, 8 insertions(+) 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 8668a324f33..3477db821b1 100644 --- a/packages/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm +++ b/packages/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm @@ -258,10 +258,18 @@ - (void)updateProps:(const Props::Shared &)props oldProps:(const Props::Shared & if (newTextInputProps.traits.keyboardType != oldTextInputProps.traits.keyboardType) { _backedTextInputView.keyboardType = RCTUIKeyboardTypeFromKeyboardType(newTextInputProps.traits.keyboardType); + // Without the call to reloadInputViews, the keyboard will not change until the textInput field (the first + // responder) loses and regains focus. Matches the legacy-architecture behavior in RCTBaseTextInputView. + if (_backedTextInputView.isFirstResponder) { + [_backedTextInputView reloadInputViews]; + } } if (newTextInputProps.traits.returnKeyType != oldTextInputProps.traits.returnKeyType) { _backedTextInputView.returnKeyType = RCTUIReturnKeyTypeFromReturnKeyType(newTextInputProps.traits.returnKeyType); + if (_backedTextInputView.isFirstResponder) { + [_backedTextInputView reloadInputViews]; + } } if (newTextInputProps.traits.textContentType != oldTextInputProps.traits.textContentType) {