question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[RN 0.48.3 TextInput] onSubmitEditing not called if blurOnSubmit set to false

See original GitHub issue

Is this a bug report?

Yes

Have you read the Contributing Guidelines?

Yes

Environment

react-native -v: 0.48.3 node -v: 8.4.0 npm -v: 4.6.1 yarn --version: Target Platform: Android Development Operating System: Windows 10 Build tools: react-native run-android

Steps to Reproduce

<TextInput placeholder="one" blurOnSubmit={ false } onSubmitEditing={() => { this.focusNextField('two'); }} returnKeyType={ "next" } style={styles.textInput} ref={ input => { this.inputs['one'] = input; }} /> <TextInput placeholder="two" blurOnSubmit={ false } onSubmitEditing={() => { this.focusNextField('three'); }} returnKeyType={ "next" } style={styles.textInput} ref={ input => { this.inputs['two'] = input; }} />

  1. If I press the next button onSubmitEditing callback not called

Expected Behavior

onSubmitEditing should be called for blurOnSubmit={false} text inputs In other versions it works normally, in 48.3 I need to remove the blurOnSubmit = {false} so that the focus goes to the next input

Reproducible Demo

https://medium.com/reactnative/tabbing-through-input-fields-ef283f923ab1

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:26
  • Comments:25 (6 by maintainers)

github_iconTop GitHub Comments

9reactions
nhuthancommented, Oct 11, 2017

still not work in RN 0.49.3 (android 7.1.2)

3reactions
MLStoltzenburgcommented, Oct 3, 2017

+1 I tested in RN 0.49, I had the same problem!

Read more comments on GitHub >

github_iconTop Results From Across the Web

textinput text not submitting using onsubmitEditing using ...
you have to pass text from submit event to the function, <TextInput onSubmitEditing={(event) => this.onSubmit(event.nativeEvent.text)} />.
Read more >
types/react-native/index.d.ts - UNPKG
187, * Adds a listener to be invoked when events of the specified type are ... 1193, * If `false`, TextInput always asks...
Read more >
Focus on the Next TextInput when Next Keyboard Button is ...
The onSubmitEditing is called when that button is pressed. This will then trigger focus on the text input that we have a ref...
Read more >
TextInput - React Native
will not be applied if multiline=false . ... Note that for multiline fields, setting blurOnSubmit to true means that ... If false, text...
Read more >
TextInput - React Native 中文网
If true , context menu is hidden. The default value is false . 类型, 必需. bool, No. dataDetectorTypes ​. 设置text input 内能被转化为 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found