Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onSubmitEditing is no longer called when blurOnSubmit is false #15299

Closed
janicduplessis opened this issue Jul 31, 2017 · 2 comments
Closed

onSubmitEditing is no longer called when blurOnSubmit is false #15299

janicduplessis opened this issue Jul 31, 2017 · 2 comments
Assignees
Labels
Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot.

Comments

@janicduplessis
Copy link
Contributor

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

- (BOOL)textFieldShouldEndEditing:(RCTTextField *)textField

and
- (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

@janicduplessis janicduplessis added the Platform: iOS iOS applications. label Jul 31, 2017
@shergin shergin self-assigned this Aug 10, 2017
janicduplessis referenced this issue Aug 11, 2017
…mit`

Reviewed By: fmoo

Differential Revision: D5606771

fbshipit-source-id: 6b769553c08c56b93036e517f71e011b6ecd779b
@shergin
Copy link
Contributor

shergin commented Aug 11, 2017

Fixed in b06672e.

@shergin shergin closed this as completed Aug 11, 2017
@joncursi
Copy link
Contributor

joncursi commented Oct 5, 2017

@shergin this is still an issue on Android. See #16038

@facebook facebook locked as resolved and limited conversation to collaborators Aug 11, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Aug 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

4 participants