From: Winkarst <74284083+Winkarst-cpu@users.noreply.github.com> Date: Thu, 19 Sep 2024 14:01:54 +0000 (+0300) Subject: Dialog windows now grab the keyboard focus (#31294) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=0093fce5b498442cdee49644c4126dd1ea2a26e1;p=space-station-14.git Dialog windows now grab the keyboard focus (#31294) * Dialog windows now grab the keyboard focus * Comment --- diff --git a/Content.Client/UserInterface/Controls/DialogWindow.xaml.cs b/Content.Client/UserInterface/Controls/DialogWindow.xaml.cs index f50aca581b..733dbe3265 100644 --- a/Content.Client/UserInterface/Controls/DialogWindow.xaml.cs +++ b/Content.Client/UserInterface/Controls/DialogWindow.xaml.cs @@ -87,6 +87,9 @@ public sealed partial class DialogWindow : FancyWindow Prompts.AddChild(box); } + // Grab keyboard focus for the first dialog entry + _promptLines[0].Item2.GrabKeyboardFocus(); + OkButton.OnPressed += _ => Confirm(); CancelButton.OnPressed += _ =>