-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Description
The use case where this causes an issue is to focus the next text input with the keyboard "next" button. To detect that the "next" button was pressed I use onSubmitEditing but it is not called anymore when blurOnSubmit is false. Right now I have to set blurOnSubmit to true but causes the keyboard to close a bit then reopen which is bad instead of just staying opened.
Looks like the logic changed in the recent refactors:
Old delegate implementation
react-native/Libraries/Text/RCTTextField.m
Line 267 in 9afb71f
- (BOOL)textFieldShouldEndEditing:(RCTTextField *)textField |
and
react-native/Libraries/Text/RCTTextField.m
Line 267 in 9afb71f
- (BOOL)textFieldShouldEndEditing:(RCTTextField *)textField |
New implementation
https://github.com/facebook/react-native/blob/master/Libraries/Text/RCTTextInput.m#L118
Repro
It works on snack because it doesn't have the text input changes yet, the same code doesn't work currently on master.
https://snack.expo.io/HJMHiNaI-
cc @shergin