From 56a4729049bd084f5c4032bb02ae259fb8cc6499 Mon Sep 17 00:00:00 2001 From: zhongwuzw Date: Mon, 16 Dec 2024 10:31:29 +0800 Subject: [PATCH] [iOS] Fabric: Fixes Numeric TextInput not triggering onSubmitEditing --- .../ComponentViews/TextInput/RCTTextInputComponentView.mm | 2 ++ 1 file changed, 2 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 c595e7af5d19d0..29a16c386bae22 100644 --- a/packages/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm +++ b/packages/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm @@ -639,6 +639,8 @@ - (void)setDefaultInputAccessoryView - (void)handleInputAccessoryDoneButton { + // Ignore the value of whether we submitted; just make sure the submit event is called if necessary. + [self textInputShouldSubmitOnReturn]; if ([self textInputShouldReturn]) { [_backedTextInputView endEditing:YES]; }