Skip to content

Single-line TextFields allow multi-line text #9340

@cbracken

Description

@cbracken

Steps to Reproduce

On all platforms

  1. Select text that includes a newline and copy it.
  2. Paste into a single-line text field. e.g., the Name field in the Gallery Text fields demo.

Text overflows down the screen. Expected behaviour is that the text is inserted with newlines replaced with spaces.

On iOS only

  1. Open Flutter Gallery on an iOS device and open the Text fields demo.
  2. Tap in the Name field. Keyboard pops up.
  3. Tap the return key.

A newline is inserted. For single-line textfields, we should probably set returnKeyType to UIReturnKeyDone.

Flutter Doctor

[✓] Flutter (on Mac OS X 10.12.4 16E195, channel master)
    • Flutter at /Users/cbracken/src/flutter/flutter
    • Framework revision c12c019bcc (3 hours ago), 2017-04-11 13:48:04 -0700
    • Engine revision 5d9a642257
    • Tools Dart version 1.23.0-dev.11.6

Metadata

Metadata

Assignees

Labels

a: text inputEntering text in a text field or keyboard related problemsframeworkflutter/packages/flutter repository. See also f: labels.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions