Multiline TextInput not working correctly on SDK 15

Hey there,

So, this problem took me a few hours to nail down.

In my (demo) app, I’ve got simple a multiline TextInput.

Now usualy I use the Android Keyboard SwiftKey for my daily use. Now, if I enter text and then hit the enter key on the keyboard, the onSubmitEditing event is fired and the keyboard collapses. According to the doco, this event shouldn’t be fired when multiline={true}. I also tested this with the Lastpass keyboard (its a password manager that has its own keyboard) and the same thing happens as with SwiftKey.

If I use the standard GBoard keyboard things work as expedted (a new line is added and no event is fired).

I found an entry on the SwiftKey forums, but no solution:
https://vip.swiftkey.com/index.php?/topic/17110-line-breaks-not-working-as-expected.

Here is a expo.sketch: https://sketch.expo.io/By-OQqGhg
And here is my demo project with the SDK15:
https://github.com/codewithpassion/expo-keyboard-issue

If I use the exact same code and use SDK14 it works as expected.

So, I understand that this is very much an edge case and probably related to something in react-native.
I’m happy to raise it as a github issue somewhere, I just have no clue where.

Hope we can find a solution for this!

  • Dom

Hi Dom,

Thank you for the detailed report! I looked through our internal changes and didn’t find anything related to this, so I think it’s just a regression in core react-native. I searched for related issues in the react-native repo and didn’t find anything https://github.com/facebook/react-native/issues?utf8=✓&q=is%3Aissue%20is%3Aopen%20onSubmitEditing so opening a new issue there is probably a good next step.

Hi Jesse,

Thanks for the info,
What’s the difference in the react-native versions used in Expo SDK14 and 15?

Regards,
Dom

Sorry I missed your message. SDK14 uses 0.41.0 and SDK15 uses 0.42.0.