diff --git a/packages/react-native/ReactCommon/React-FabricComponents.podspec b/packages/react-native/ReactCommon/React-FabricComponents.podspec index f108ac15c26..0681668f1e6 100644 --- a/packages/react-native/ReactCommon/React-FabricComponents.podspec +++ b/packages/react-native/ReactCommon/React-FabricComponents.podspec @@ -153,7 +153,8 @@ Pod::Spec.new do |s| ss.subspec "iostextinput" do |sss| sss.dependency folly_dep_name, folly_version sss.compiler_flags = folly_compiler_flags - sss.source_files = "react/renderer/components/textinput/platform/ios/**/*.{m,mm,cpp,h}" + sss.source_files = "react/renderer/components/textinput/**/*.{m,mm,cpp,h}" + sss.exclude_files = "react/renderer/components/textinput/platform/android" sss.header_dir = "react/renderer/components/iostextinput" end diff --git a/packages/react-native/ReactCommon/react/renderer/components/textinput/platform/ios/react/renderer/components/iostextinput/TextInputEventEmitter.cpp b/packages/react-native/ReactCommon/react/renderer/components/textinput/TextInputEventEmitter.cpp similarity index 97% rename from packages/react-native/ReactCommon/react/renderer/components/textinput/platform/ios/react/renderer/components/iostextinput/TextInputEventEmitter.cpp rename to packages/react-native/ReactCommon/react/renderer/components/textinput/TextInputEventEmitter.cpp index 6eb58c1681a..1d130feebb5 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/textinput/platform/ios/react/renderer/components/iostextinput/TextInputEventEmitter.cpp +++ b/packages/react-native/ReactCommon/react/renderer/components/textinput/TextInputEventEmitter.cpp @@ -19,6 +19,8 @@ static jsi::Value textInputMetricsPayload( "text", jsi::String::createFromUtf8(runtime, textInputMetrics.text)); + payload.setProperty(runtime, "target", textInputMetrics.target); + payload.setProperty(runtime, "eventCount", textInputMetrics.eventCount); { @@ -81,7 +83,7 @@ static jsi::Value textInputMetricsScrollPayload( payload.setProperty( runtime, "zoomScale", - textInputMetrics.zoomScale ? textInputMetrics.zoomScale : 1); + textInputMetrics.zoomScale != 0.0f ? textInputMetrics.zoomScale : 1); return payload; }; diff --git a/packages/react-native/ReactCommon/react/renderer/components/textinput/platform/ios/react/renderer/components/iostextinput/TextInputEventEmitter.h b/packages/react-native/ReactCommon/react/renderer/components/textinput/TextInputEventEmitter.h similarity index 99% rename from packages/react-native/ReactCommon/react/renderer/components/textinput/platform/ios/react/renderer/components/iostextinput/TextInputEventEmitter.h rename to packages/react-native/ReactCommon/react/renderer/components/textinput/TextInputEventEmitter.h index 9182dd3d2ed..dae4755e796 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/textinput/platform/ios/react/renderer/components/iostextinput/TextInputEventEmitter.h +++ b/packages/react-native/ReactCommon/react/renderer/components/textinput/TextInputEventEmitter.h @@ -27,6 +27,7 @@ class TextInputEventEmitter : public ViewEventEmitter { int eventCount; Size layoutMeasurement; Float zoomScale; + Tag target; }; struct KeyPressMetrics { diff --git a/packages/react-native/ReactCommon/react/renderer/components/textinput/platform/ios/react/renderer/components/iostextinput/TextInputShadowNode.h b/packages/react-native/ReactCommon/react/renderer/components/textinput/platform/ios/react/renderer/components/iostextinput/TextInputShadowNode.h index f553ea284ea..eef1e3321ab 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/textinput/platform/ios/react/renderer/components/iostextinput/TextInputShadowNode.h +++ b/packages/react-native/ReactCommon/react/renderer/components/textinput/platform/ios/react/renderer/components/iostextinput/TextInputShadowNode.h @@ -8,10 +8,10 @@ #pragma once #include -#include #include #include #include +#include #include #include #include