Skip to content

Typing right after Ctrl+N goes nowhere until the editor is clicked #551

Description

@erikdarlingdata

Found during the Avalonia 12 upgrade's driven GUI pass, then reproduced on the INSTALLED 1.25 build (Avalonia 11) — this is pre-existing, not a 12 regression, which is why it was kept out of PR #549.

Repro: Ctrl+N to open a new query tab, type immediately. The keystrokes vanish — the shortcut processes (tab created and selected, FocusEditor runs on attach per the code's stated intent), but keyboard focus is not in the editor until you click anywhere in the editor area (the empty-state background click hands focus over, as designed). Same behavior driven synthetically on both the 12 branch and the installed 11 build, screenshot-evidenced both times.

Suspicion, unverified: something after the attach pass (tab selection or window focus handling) wins the focus race against FocusEditor(); a dispatcher-posted focus at input priority would likely stick. Headless tests cannot catch it — SessionKeyboardTests raise events on the editor directly, and real-window focus arbitration never runs there.

Fix belongs in a normal release, not the migration.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions