mirror of
https://github.com/status-im/react-native.git
synced 2025-01-27 09:45:04 +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
|
- (BOOL)textInputShouldReturn
|
||||||
{
|
{
|
||||||
return _blurOnSubmit;
|
// We send `submit` event here, in `textInputShouldReturn`
|
||||||
}
|
// (not in `textInputDidReturn)`, because of semantic of the event:
|
||||||
|
// `onSubmitEditing` is called when "Submit" button
|
||||||
- (void)textInputDidReturn
|
// (the blue key on onscreen keyboard) did pressed
|
||||||
{
|
// (no connection to any specific "submitting" process).
|
||||||
[_eventDispatcher sendTextEventWithType:RCTTextEventTypeSubmit
|
[_eventDispatcher sendTextEventWithType:RCTTextEventTypeSubmit
|
||||||
reactTag:self.reactTag
|
reactTag:self.reactTag
|
||||||
text:self.backedTextInputView.text
|
text:self.backedTextInputView.text
|
||||||
key:nil
|
key:nil
|
||||||
eventCount:_nativeEventCount];
|
eventCount:_nativeEventCount];
|
||||||
|
|
||||||
|
return _blurOnSubmit;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)textInputDidReturn
|
||||||
|
{
|
||||||
|
// Does nothing.
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)textInputDidChangeSelection
|
- (void)textInputDidChangeSelection
|
||||||
|
Loading…
x
Reference in New Issue
Block a user