Skip to content

[TextInput] Multiline doesn't work with certain keyboards on android #13159

Closed
@codewithpassion

Description

@codewithpassion

Hi react-native team,

I'm using the Expo framework and came across an issue with multiline TextInput

In my (demo) app (see below), I've got simple a multiline TextInput.

Now usually 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 expected (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-expected1.

Example

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

If I use the exact same code and use Expo 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.

The difference between Expo SDK14/15 is a move from react-native 0.41.2 to 0.42.0 as far as I know.

Additional Information

  • React Native version: 0.42.0
  • Platform: Androind with SwitfKey and Lastpass keyboards (that's what I've tested with)
  • Development Operating System: Linux using Expo

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions