Repository: flutter
Issue: Textfield focus can become unattainable on an embedded flutter application in Safari
Labels: a: text input,platform-web,f: focus,has reproducible steps,browser: safari-macos,P2,team-web,triaged-web,found in release: 3.16,found in release: 3.19

### Steps to reproduce

The minimal code to reproduce the issue can be found [here](https://github.com/pearlcertification/safari_embedded_bug).

Steps to reproduce:
- Run the application and load the URL in Safari
- Click in the text field and type something
- Keystrokes will update the contents of the text field
- Click outside the embedded widget
- Click in the text field again and type something
- Keystrokes will _not_ update the contents of the text field

You can get around the issue by clicking inside the embedded application (but not in the text field) and then clicking back in the text field. After that, the text field contents will again update on each keystroke.

### Expected results

Typing in a text field should always update the contents of that text field in an embedded Flutter application (or any Flutter application).

### Actual results

After following the steps to reproduce, the text field no longer updates while the user is typing.

### Code sample

<details open><summary>Code sample</summary>

You can access a minimal code example here: https://github.com/pearlcertification/safari_embedded_bug

</details>


### Screenshots or Video

<details open>
<summary>Screenshots / Video demonstration</summary>

[Upload media here]

</details>


### Logs

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


### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
❯ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.16.7, on macOS 14.2.1 23C71 darwin-arm64 (Rosetta), locale en)
[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.3)
[✓] Android Studio (version 2022.3)
[✓] VS Code (version 1.85.2)
[✓] VS Code (version 1.81.0-insider)
[✓] Connected device (2 available)
    ! Error: Browsing on the local area network for Jarvis Pad. Ensure the device is unlocked and attached with a cable or associated with the same local area
      network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)
    ! Error: Browsing on the local area network for Justin’s Apple Watch. Ensure the device is unlocked and discoverable via Bluetooth. (code -27)
    ! Error: Browsing on the local area network for Jarvis XIV. Ensure the device is unlocked and attached with a cable or associated with the same local area
      network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)
    ! Error: Browsing on the local area network for Jarvis XV. Ensure the device is unlocked and attached with a cable or associated with the same local area
      network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)
[✓] Network resources

• No issues found!

```

</details>