diff --git a/packages/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.mm b/packages/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.mm index ea70105798ab..2ee9dd67e67c 100644 --- a/packages/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.mm +++ b/packages/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.mm @@ -43,6 +43,7 @@ void RCTCopyBackedTextInput( toTextInput.scrollEnabled = fromTextInput.scrollEnabled; toTextInput.secureTextEntry = fromTextInput.secureTextEntry; toTextInput.keyboardType = fromTextInput.keyboardType; + toTextInput.returnKeyType = fromTextInput.returnKeyType; toTextInput.textContentType = fromTextInput.textContentType; toTextInput.smartInsertDeleteType = fromTextInput.smartInsertDeleteType; toTextInput.passwordRules = fromTextInput.passwordRules; diff --git a/packages/react-native/React/Tests/Text/RCTTextInputUtilsTest.mm b/packages/react-native/React/Tests/Text/RCTTextInputUtilsTest.mm index 2559670f8658..0adb9424c4af 100644 --- a/packages/react-native/React/Tests/Text/RCTTextInputUtilsTest.mm +++ b/packages/react-native/React/Tests/Text/RCTTextInputUtilsTest.mm @@ -26,4 +26,15 @@ - (void)testCopyBackedTextInputPreservesTintColor XCTAssertEqualObjects(destination.tintColor, UIColor.redColor); } +- (void)testCopyBackedTextInputPreservesReturnKeyType +{ + RCTUITextField *source = [RCTUITextField new]; + RCTUITextView *destination = [RCTUITextView new]; + source.returnKeyType = UIReturnKeyDone; + + RCTCopyBackedTextInput(source, destination); + + XCTAssertEqual(destination.returnKeyType, UIReturnKeyDone); +} + @end