Skip to content

BUG: blurOnSubmit for TextInput are deprecated. Use submitBehavior instead #2817

@daledah

Description

@daledah

Is there an existing issue for this?

  • I have searched the existing issues

Describe the issue

React Native has deprecated the blurOnSubmit prop for TextInput. Migrate deprecated blurOnSubmit to submitBehavior.

According to the React Native docs, for multiline inputs, setting blurOnSubmit: true should be equivalent to using submitBehavior="blurAndSubmit"

In the web, a standard HTML <input>/<textarea> doesn’t have an equivalent submitBehavior property.

=> when set submitBehavior="blurAndSubmit" for text input and press enter, it will go to next line instead of submit

Expected behavior

When pressing enter, it will submit

Steps to reproduce

  1. Create a TextInput with submitBehavior="blurAndSubmit"
  2. Press Enter key

Test case

https://codesandbox.io/p/devbox/sharp-nobel-p8z4s9

Additional comments

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions