Repository: flutter
Issue: [Windows Desktop] The TextField doesn't properly handle line breaks in copied and pasted text
Labels: a: text input,platform-windows,has reproducible steps,P2,found in release: 3.13,found in release: 3.14,team-windows,triaged-windows

### Steps to reproduce

The error occurs only on flutter desktop.
If you copy and paste a text containing line breaks, the TextField will not recognize them.
<details>
<summary>Text used in the video</summary>
Mauris rutrum ligula a odio tempus elementum. Nullam mollis rhoncus augue, quis sodales tortor cursus vel. Etiam consequat condimentum nisi, et viverra felis ullamcorper nec. Phasellus vestibulum in nisl et mollis. Vestibulum maximus auctor dui, eget accumsan lacus eleifend at. Suspendisse mauris nisl, ultricies dapibus tincidunt ac, euismod at neque. Suspendisse nibh sem, elementum vel faucibus ut, condimentum eget lectus. Sed at blandit nisl. Donec ut sapien eget enim scelerisque cursus. In sed rhoncus dui.

Maecenas at leo viverra lectus aliquam placerat. Nulla facilisi. Maecenas pharetra eget massa sit amet consectetur. Aliquam venenatis ornare vulputate. Nunc blandit dignissim molestie. Aenean facilisis tempor quam, facilisis pellentesque elit mollis vitae. Integer tristique porttitor finibus. Sed ut tortor ac nisl interdum lacinia nec maximus ex.
 faucibus augue vehicula ut

Nulla sed ultricies ante. Nulla facilisi. Nam id velit vitae libero aliquam fermentum. Proin sapien enim, fermentum quis eros eu, pulvinar mollis ligula. Curabitur pretium tristique lobortis. Donec magna ante, ultricies id bibendum sed, tempor a turpis. Praesent commodo risus mi, ac porttitor mauris eleifend id. Mauris interdum, mi sit amet rhoncus laoreet, augue est interdum ipsum, eget blandit augue est viverra enim. Pellentesque vestibulum pellentesque pretium. Integer ac efficitur sapien, at placerat sapien.

Suspendisse vitae purus congue, mollis ipsum a, semper nisi. Donec sed magna metus. Aliquam elementum, odio id congue ultrices, justo lorem vestibulum mi, ac tristique ante nibh vel nulla. Integer eu elit leo. Fusce congue malesuada diam, vitae faucibus augue vehicula ut. Integer congue, est eget euismod dignissim, nisl odio dictum ante, quis rhoncus dui eros pulvinar ipsum. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Phasellus porta nec sapien in pharetra. Nam condimentum velit at risus ultrices, sit amet luctus dolor viverra. Donec ultrices porttitor pretium. Maecenas elementum dictum placerat. Etiam commodo purus quis neque vulputate luctus.

Proin vel dapibus neque. Integer interdum ligula ac neque porta, eu varius urna tincidunt. Nulla facilisi. Curabitur orci erat, luctus sed fermentum nec, sollicitudin a risus. Suspendisse at justo porttitor enim aliquet maximus in nec lorem. Sed consequat bibendum sapien quis blandit. Pellentesque eros neque, rutrum vel pharetra ut, porta eget tellus. Pellentesque turpis quam, lacinia vitae porttitor eu, elementum eget dolor. Proin blandit nisl ac mauris sodales, vitae congue diam placerat. Maecenas venenatis lacinia metus a dictum.

Nullam a eleifend mi, id hendrerit metus. Duis dolor ligula, varius et feugiat ut, luctus id metus. Proin vel varius lorem. Maecenas et neque sit amet ipsum eleifend hendrerit. Mauris vel magna sed felis lacinia sollicitudin eu ut dui. Ut aliquam massa massa, nec tincidunt risus tincidunt quis. Aenean in tellus tincidunt, lobortis est mollis, finibus enim. Curabitur in mauris sit amet lorem mattis congue. Nullam porta gravida varius. Mauris egestas eget tortor eget venenatis. Quisque vel posuere dolor, ut mollis velit. Aenean non ex at urna laoreet tristique. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Suspendisse ornare mauris a ex lobortis tempus. Duis eu felis pellentesque, ultrices augue vel, placerat odio.
</details>

### Expected results

flutter desktop: textfield must recognize line breaks if they are selected with the mouse or navigated with the keyboard

### Actual results

currently if you select a line break with the mouse you must double click to be able to write and if you navigate to the line break with the keyboard you return to the beginning of the paragraph

### Code sample

<details><summary>Code: </summary>

```dart
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      theme: ThemeData.dark(),
      home: const Scaffold(
        body: TextField(maxLines: null),
      ),
    );
  }
}
```
</details>

### Screenshots or Video

<details>
<summary>Video web✔</summary>

https://github.com/flutter/flutter/assets/87993847/c61f20fc-676f-4d45-a7e6-5a0ef4474dd6
</details>

<details>
<summary>Video Desktop❌</summary>

https://github.com/flutter/flutter/assets/87993847/aa4998c1-4e8d-416b-9572-19a59d63d482
</details>



### Logs

_No response_

### Flutter Doctor output

<details><summary>Doctor output</summary>

```console
[√] Flutter (Channel stable, 3.10.6, on Microsoft Windows [Versi¢n 10.0.19045.3324], locale es-CO)
    • Flutter version 3.10.6 on channel stable at C:\Users\franc\fvm\versions\3.10.6
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision f468f3366c (7 weeks ago), 2023-07-12 15:19:05 -0700        
    • Engine revision cdbeda788a
    • Dart version 3.0.6
    • DevTools version 2.23.1

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at C:\Users\franc\AppData\Local\Android\sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java      
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-9586694)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.6.2)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.6.33723.286
    • Windows 10 SDK version 10.0.22000.0

[√] Android Studio (version 2022.2)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-9586694)

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Versi¢n 10.0.19045.3324]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 116.0.5845.111
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 116.0.1938.62

[√] Network resources
    • All expected network resources are available.

• No issues found!
```

</details>