From 42472db389a76f06d340139cb32fb9f03ea2b6e0 Mon Sep 17 00:00:00 2001 From: Tien Anh Nguyen Date: Sun, 6 Nov 2022 11:41:46 +0700 Subject: [PATCH] feat: fix show soft input on focus behavior --- Libraries/Text/TextInput/RCTBaseTextInputView.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Libraries/Text/TextInput/RCTBaseTextInputView.m b/Libraries/Text/TextInput/RCTBaseTextInputView.m index 04e5a49094ad37..23af14568c2764 100644 --- a/Libraries/Text/TextInput/RCTBaseTextInputView.m +++ b/Libraries/Text/TextInput/RCTBaseTextInputView.m @@ -313,6 +313,11 @@ - (void)setShowSoftInputOnFocus:(BOOL)showSoftInputOnFocus if (showSoftInputOnFocus) { // Resets to default keyboard. self.backedTextInputView.inputView = nil; + + // Without the call to reloadInputViews, the keyboard will not change until the textInput field (the first responder) loses and regains focus. + if (self.backedTextInputView.isFirstResponder) { + [self.backedTextInputView reloadInputViews]; + } } else { // Hides keyboard, but keeps blinking cursor. self.backedTextInputView.inputView = [UIView new];