Bring back macOS _blurOnSubmit check for -[RCTBaseTextInputView textInputShouldReturn]

This commit is contained in:
Adam Gleitman 2021-08-30 13:22:51 -07:00
Родитель 1b425ac621
Коммит defd1a9a7f
1 изменённых файлов: 11 добавлений и 5 удалений

Просмотреть файл

@ -413,11 +413,17 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithFrame:(CGRect)frame)
// `onSubmitEditing` is called when "Submit" button
// (the blue key on onscreen keyboard) did pressed
// (no connection to any specific "submitting" process).
[_eventDispatcher sendTextEventWithType:RCTTextEventTypeSubmit
reactTag:self.reactTag
text:[self.backedTextInputView.attributedText.string copy]
key:nil
eventCount:_nativeEventCount];
#if TARGET_OS_OSX // [TODO(macOS Candidate ISS#2710739)
if (_blurOnSubmit) {
#endif // ]TODO(macOS Candidate ISS#2710739)
[_eventDispatcher sendTextEventWithType:RCTTextEventTypeSubmit
reactTag:self.reactTag
text:[self.backedTextInputView.attributedText.string copy]
key:nil
eventCount:_nativeEventCount];
#if TARGET_OS_OSX // [TODO(macOS Candidate ISS#2710739)
}
#endif // ]TODO(macOS Candidate ISS#2710739)
return _blurOnSubmit;
}