Skip to content

TextInput: Single line TextInputs can cause unexpected line feeds by pasting in the input #2303

Open
@bear-ei

Description

@bear-ei

Environment

react-native -v: 0.75.0
npm ls react-native-macos: 0.75.16
node -v: 23.1.0
npm -v: 10.9.0
yarn --version: 4.5.0
xcodebuild -version: Build version 16B40

Steps to reproduce the bug

1.Copying a long text by shortcut
2.Use shortcut keys to paste long text into TextInput.

Expected Behavior

Long text should be on one line.

Actual Behavior

Long text can be accidentally line-breaked in some cases where copied text trails a lot of space characters.

Reproducible Demo

2024-12-04.21.22.28.mov

The copied TextInput header will actually follow a large number of blank characters when pasted, about a full line. Perhaps this problem is causing accidental line breaks.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions