mirror of
https://github.com/status-im/react-native.git
synced 2025-01-27 01:40:08 +00:00
TextInput: onSubmitEditing
is now woriking with disabled blurOnSubmit
Reviewed By: fmoo Differential Revision: D5606771 fbshipit-source-id: 6b769553c08c56b93036e517f71e011b6ecd779b
This commit is contained in:
parent
4510760447
commit
b06672e6cf
@ -117,16 +117,23 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithFrame:(CGRect)frame)
|
||||
|
||||
- (BOOL)textInputShouldReturn
|
||||
{
|
||||
return _blurOnSubmit;
|
||||
}
|
||||
|
||||
- (void)textInputDidReturn
|
||||
{
|
||||
// We send `submit` event here, in `textInputShouldReturn`
|
||||
// (not in `textInputDidReturn)`, because of semantic of the event:
|
||||
// `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.text
|
||||
key:nil
|
||||
eventCount:_nativeEventCount];
|
||||
|
||||
return _blurOnSubmit;
|
||||
}
|
||||
|
||||
- (void)textInputDidReturn
|
||||
{
|
||||
// Does nothing.
|
||||
}
|
||||
|
||||
- (void)textInputDidChangeSelection
|
||||
|
Loading…
x
Reference in New Issue
Block a user