Skip to content

[Windows] The Enter key does not work on the first click after refocusing the app window #169447

@guide-congtv

Description

@guide-congtv

Steps to reproduce

  1. Launch a New Flutter Desktop application
  2. Use the Tab key to focus on the button, then press Enter to open a external browser(The purpose is to make the app lose focus)
  3. Return focus to app and continue repeating the behavior from step 2 a few times (2–3 times)
  4. Check result

Expected results

In step 3, The first Enter key press should trigger the event.

Actual results

In step 3, the first Enter key press does not trigger any action. Pressing the Enter key twice for it to work.

Code sample

Code sample
N/A

Screenshots or Video

Screenshots / Video demonstration N/A

Logs

Logs
N/A

Flutter Doctor output

Doctor output
[√] Flutter (Channel stable, 3.32.0, on Microsoft Windows [Version 10.0.22631.5189], locale en-US) [320ms]
    • Flutter version 3.32.0 on channel stable at C:\Users\**\fvm\versions\3.32.0
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision be698c48a6 (6 days ago), 2025-05-19 12:59:14 -0700
    • Engine revision 1881800949
    • Dart version 3.8.0
    • DevTools version 2.45.1

[√] Windows Version (11 Pro 64-bit, 23H2, 2009) [2.5s]
....

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projecta: text inputEntering text in a text field or keyboard related problemsf: focusFocus traversal, gaining or losing focusfound in release: 3.32Found to occur in 3.32found in release: 3.33Found to occur in 3.33has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-windowsBuilding on or for Windows specificallyteam-windowsOwned by the Windows platform teamtriaged-windowsTriaged by the Windows platform team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions