Skip to content

Commit

Permalink
Dialog windows now grab the keyboard focus (#31294)
Browse files Browse the repository at this point in the history
* Dialog windows now grab the keyboard focus

* Comment
  • Loading branch information
Winkarst-cpu authored Sep 19, 2024
1 parent 90d1936 commit 0093fce
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Content.Client/UserInterface/Controls/DialogWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ public DialogWindow(string title, List<QuickDialogEntry> entries, bool ok = true
Prompts.AddChild(box);
}

// Grab keyboard focus for the first dialog entry
_promptLines[0].Item2.GrabKeyboardFocus();

OkButton.OnPressed += _ => Confirm();

CancelButton.OnPressed += _ =>
Expand Down

0 comments on commit 0093fce

Please sign in to comment.