From a5b92f34c452a4232c8603528f06dfed7ef12747 Mon Sep 17 00:00:00 2001 From: Samuel Susla Date: Sat, 12 Jun 2021 12:25:19 -0700 Subject: [PATCH] Resign text input as first responder in prepareForRecycle Summary: Changelog: [internal] To prevent wrong TextInput becoming first responder, force a resign when preparing for a reuse. Reviewed By: JoshuaGross Differential Revision: D29085923 fbshipit-source-id: 246cdf0628f914c3928cc9c7499d029b77684f2c --- .../ComponentViews/TextInput/RCTTextInputComponentView.mm | 1 + 1 file changed, 1 insertion(+) diff --git a/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm b/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm index 0018c787236..be120f41080 100644 --- a/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm +++ b/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm @@ -258,6 +258,7 @@ using namespace facebook::react; _lastStringStateWasUpdatedWith = nil; _ignoreNextTextInputCall = NO; _didMoveToWindow = NO; + [_backedTextInputView resignFirstResponder]; } #pragma mark - RCTBackedTextInputDelegate