-
Notifications
You must be signed in to change notification settings - Fork 24k
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
TextInput multiline={true} not functioning as expected #12717
Comments
I can reproduce it on Android. But not on iOS.
|
It blurs on Sony's Swift Keyboard, |
+1 |
It blurs on Samsung Galaxy S6 keyboard. |
Yeah it was happening to me on a Samsung s6 |
Google English keyboard works as in that Enter will give a new line. Google Japanese keyboard does not work. A chinese input method I have also does not work. Android. |
Had the same problem with SwiftKey Keyboard. Following fixed it for me: |
+1 |
#12923 didn't fix our case. We tried to replace the entire ReactAndroid folder, but in vain. |
@goodhyun have you built ReactNative from source? |
+1 on this, we need a fix for this for our app because it affects Samsung. |
I have the same issue while using Expo. The Expo SDK 15 brought RN 0.42 and broke my input field. |
Doesn't work onContentSizeChange event in release 0.43.2. wtf |
+1 |
Having same issue. :'( same version , using expo , swiftkey |
+1 |
Can confirm onContentSizeChange also not working in 43.* |
Below is useful to me, use expo SDK 17, RN 0.44, wrote by Typescript. https://gist.github.com/BCGen/9ba9f7d96459fd063e42bd53f9839217 |
+1 Same here for Sony Z5 Compact. Why isn't this fixed yet? I'm a SwiftKey user as well, it seems to affect only those. Native Sony Keyboard works like a charm. |
I don't think it's just swift key, I'm using a bog standard emulator and have the issue. |
Same here, totally failed on my three android devices, any updating? |
Having same issue: pressed enter and got submit triggered not entering a newline. Platform: android 7.1.1 |
any update on this issue? |
Same problem |
I've solved setting the
By default, |
0.48.0-rc.0 and 0.47.1 are not yet good. |
People, I did a search and I found other related issues opened here in github. Did someone solve this or got a better workaround than inserting newline on demand? |
Tried to Build ReactAndroid from source from: https://facebook.github.io/react-native/docs/android-building-from-source.html, with this patch: e694199. Bug still persist on Samsung keyboard and Google Chinese keyboard. Don't think this will be resolved anytime soon since this has been dragging for months. Meanwhile using wrapper class from https://gist.github.com/catchin/47afe706256604959c13dc25e7bb9383, while waiting for patch. |
@holyxiaoxin That's sad. Probably different keyboard has different problems. 😢 |
@vendramini That issue discuss iOS specific problem, this one discuss Android specific one. |
@shergin Bug reproduced on ASUS ZenUI keyboard, Android 7.0, Expo SDK 20 / RN 0.47 ... Please try installing this keyboard |
@ceefour Thank you! I will try! |
It still has errors on Samsung Galaxy S6 keyboard also S7 keyboard. |
Agree with @poongnewga , this seems to be a behavior of certain third-party keyboards (which are in common usage). I think it's independent of Android version or manufacturer, since with my Asus Zenfone 3, I see similar behavior as him, i.e. the bug only occurs when I use ZenUI keyboard, and disappears when I switch to GBoard. |
@shergin can you point to commit where this was fixed? |
Finally this is fixed in 0.48. Setting blurOnSubmit={false} does it. Fixed new line and prioritise blurOnSubmit in multiline text input (e694199) - @kevinluvian |
@zhangzhhz While I appreciate if it's really "fixed", the docs say
Why the need to set to it false when it should default to false in the first place! |
Probably to maintain backward comparability |
@ceefour Do you mean that in your opinion it should be always |
@shergin it doesn't respect the docs, so either one should be changed to match the other. I prefer behavior stated in the docs. much less "unexpected surprise" that way. AFAIK React Native is the only framework where setting "blurOnSubmit=false" explicitly is required on multline text input. Same component in Ionic and Xamarin just works out of the box. |
I've tried it with Expo v20 and manually moving to react-native 0.48.1. |
@codewithpassion, have you tried explicitly setting |
Nope. Still seeing this on |
@suvodeep-pyne Yep. Starting on 0.50. |
I added this line and it worked correctly: <TextInput
onChangeText={val => this.setState({ text: val})}
value={this.state.text}
multiline
style={{minHeight: 150, height: 'auto'}}
/> |
@sturmenta your solution worked for me! |
Description
TextInput multiline set to true no longer does newline on enter press. just blurs the TextInput instead.
Reproduction
Just change from 0.41.2 to 0.42.0 using the default AutoExpandingTextInput Example from the TextInput Docs to see it happening
Additional Information
The text was updated successfully, but these errors were encountered: