diff --git a/Libraries/Text/RCTTextInput.m b/Libraries/Text/RCTTextInput.m index d949437a46d59a..8cf7ff60895cd5 100644 --- a/Libraries/Text/RCTTextInput.m +++ b/Libraries/Text/RCTTextInput.m @@ -21,6 +21,7 @@ @implementation RCTTextInput { CGSize _previousContentSize; + BOOL _hasInputAccesoryView; } - (instancetype)initWithBridge:(RCTBridge *)bridge @@ -304,12 +305,12 @@ - (void)invalidateInputAccessoryView ) && textInputView.returnKeyType == UIReturnKeyDone; - BOOL hasInputAccesoryView = textInputView.inputAccessoryView != nil; - - if (hasInputAccesoryView == shouldHaveInputAccesoryView) { + if (_hasInputAccesoryView == shouldHaveInputAccesoryView) { return; } + _hasInputAccesoryView = shouldHaveInputAccesoryView; + if (shouldHaveInputAccesoryView) { UIToolbar *toolbarView = [[UIToolbar alloc] init]; [toolbarView sizeToFit];