Skip to content

onSubmitEditing not working on TextInput when Multiline={true} in React Native(android) #17825

Closed
@nikasvan

Description

@nikasvan

Is this a bug report?

Yes

Have you read the Contributing Guidelines?

Yes

Environment

Environment:
OS: macOS High Sierra 10.13.2
Node: 7.10.1
Yarn: Not Found
npm: 4.2.0
Watchman: 4.7.0
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: 3.0 AI-171.4443003

Packages: (wanted => installed)
react: 16.0.0-alpha.12 => 16.0.0-alpha.12
react-native: https://github.com/expo/react-native/archive/sdk-21.0.2.tar.gz => 0.48.4

Steps to Reproduce

On iOS there is no problem, but on Android when I have multiline TextInput, onSubmitEditing doesn't seem to work. User types some symbols in input and when pressing return key I am expecting to stop typing option, save already typed symbols, but instead new line appears below and user continues to type.

<TextInput
  multiline
  onSubmitEditing={text => this.saveCurrentValues()}
/>

Expected Behavior

When 'return' key is pressed TextInput shouldn't break and on new line. Like it is on iOS, it should listen to onSubmitEditing()

Actual Behavior

When 'return' key is pressed there shouldn't be a new line.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Ran CommandsOne of our bots successfully processed a command.Resolution: LockedThis issue was locked by the bot.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions