diff --git a/Content.Client/Chat/ChatBox.cs b/Content.Client/Chat/ChatBox.cs index f9f9b46152..2060c1e4e9 100644 --- a/Content.Client/Chat/ChatBox.cs +++ b/Content.Client/Chat/ChatBox.cs @@ -38,6 +38,8 @@ namespace Content.Client.Chat /// public string DefaultChatFormat { get; set; } + public bool ReleaseFocusOnEnter { get; set; } = true; + protected override void Initialize() { base.Initialize(); @@ -151,7 +153,11 @@ namespace Content.Client.Chat _inputIndex = -1; Input.Clear(); - Input.ReleaseKeyboardFocus(); + + if (ReleaseFocusOnEnter) + { + Input.ReleaseKeyboardFocus(); + } } } } diff --git a/Content.Client/UserInterface/LobbyGui.cs b/Content.Client/UserInterface/LobbyGui.cs index 0ff209bba1..64f6e65402 100644 --- a/Content.Client/UserInterface/LobbyGui.cs +++ b/Content.Client/UserInterface/LobbyGui.cs @@ -28,7 +28,7 @@ namespace Content.Client.UserInterface base.Initialize(); var chatContainer = GetChild("Panel/VBoxContainer/HBoxContainer/LeftVBox"); - Chat = new ChatBox(); + Chat = new ChatBox {ReleaseFocusOnEnter = false}; chatContainer.AddChild(Chat); Chat.SizeFlagsVertical = SizeFlags.FillExpand; }