Skip to content

Commit 0bcb0c2

Browse files
zhongwuzwrobhogan
authored andcommitted
Fabric: Fixes Numeric TextInput not triggering onSubmitEditing (#48276)
Summary: Fixes #48259 . The paper code like : https://github.com/facebook/react-native/blob/2fee13094b3d384c071978776fd8b7cff0b6530f/packages/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.mm#L777-L784 ## Changelog: [IOS] [FIXED] - Fabric: Fixes Numeric TextInput not triggering onSubmitEditing Pull Request resolved: #48276 Test Plan: Repro in #48259 Reviewed By: cipolleschi Differential Revision: D67274739 Pulled By: javache fbshipit-source-id: 57396c6e1a8ef96a1b29cae4a9aa9b5f48f6080b
1 parent d34032b commit 0bcb0c2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,8 @@ - (void)setDefaultInputAccessoryView
643643

644644
- (void)handleInputAccessoryDoneButton
645645
{
646+
// Ignore the value of whether we submitted; just make sure the submit event is called if necessary.
647+
[self textInputShouldSubmitOnReturn];
646648
if ([self textInputShouldReturn]) {
647649
[_backedTextInputView endEditing:YES];
648650
}

0 commit comments

Comments
 (0)