Repository: flutter
Issue: onFieldSubmitted is not triggered in desktop platforms when `readOnly` is true
Labels: a: text input,platform-mac,platform-windows,platform-linux,a: desktop,has reproducible steps,P2,team-text-input,triaged-text-input,found in release: 3.22,found in release: 3.23

### Steps to reproduce

1. Create a simple flutter app with TextFormField on Home Page
2. Run app on windows flutter
3. Click on field
4. Press enter
5. onFieldSubmitted is not triggered

### Expected results

onFieldSubmitted should be triggered

### Actual results

onFieldSubmitted is not triggered

### Code sample

<details open><summary>Code sample</summary>

```dart
Future<void> main() async {
  runApp(MaterialApp(
    initialRoute: "/",
    routes: {
      "/": (context) => const Home(),
    },
  ));
}

class Home extends StatefulWidget {
  const Home({super.key});

  @override
  State<Home> createState() => _HomeState();
}

class _HomeState extends State<Home> {

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text("Flutter v3.22.2"),
      ),
      body: Padding(
        padding: const EdgeInsets.all(8.0),
        child: Column(
          children: [
            TextFormField(
              decoration: const InputDecoration(hintText: "First Field", labelText: "First Field"),
              readOnly: true,
              onFieldSubmitted: (val){
                var snackBar = const SnackBar(content: Text('Hello World'));
                ScaffoldMessenger.of(context).showSnackBar(snackBar);
              },
            )
          ],
        ),
      ),
    );
  }
}
```

</details>


### Screenshots or Video

<details open>
<summary>Screenshots / Video demonstration</summary>

**Expected Result in Flutter Web**

https://github.com/flutter/flutter/assets/129219828/7750ee0d-1daf-4845-bef9-2017994921b9

**Actual Results in Flutter Windows**

https://github.com/flutter/flutter/assets/129219828/abd7fdb0-2231-49c9-b72d-1332b59a041d

</details>


### Logs

<details open><summary>Logs</summary>

```console
[Paste your logs here]
```

</details>


### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
[√] Flutter (Channel stable, 3.22.2, on Microsoft Windows [Version 10.0.22621.3593], locale en-IN)
    • Flutter version 3.22.2 on channel stable at C:\Users\Admin\fvm\versions\3.22.2
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 761747bfc5 (12 days ago), 2024-06-05 22:15:13 +0200
    • Engine revision edd8546116
    • Dart version 3.4.3
    • DevTools version 2.34.3

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
    • Android SDK at C:\Users\Admin\AppData\Local\Android\sdk
    • Platform android-34, build-tools 33.0.1
    • 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 Windows apps (Visual Studio Community 2022 17.9.1)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.9.34616.47
    • Windows 10 SDK version 10.0.22621.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)

[√] VS Code (version 1.89.1)
    • VS Code at C:\Users\Admin\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.90.0

[√] Connected device (5 available)
    • CPH2467 (mobile)                   • 1a715d74      • android-arm64  • Android 14 (API 34)
    • Android SDK built for x86 (mobile) • emulator-5554 • android-x86    • Android 11 (API 30) (emulator)
    • Windows (desktop)                  • windows       • windows-x64    • Microsoft Windows [Version 10.0.22621.3593]
    • Chrome (web)                       • chrome        • web-javascript • Google Chrome 126.0.6478.61
    • Edge (web)                         • edge          • web-javascript • Microsoft Edge 125.0.2535.85

[√] Network resources
    • All expected network resources are available.

• No issues found!

```

</details>